From 8aee7e3563ec434ce692fbce0b81ef9ba53c2a0a Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 25 May 2021 17:44:07 +0200 Subject: [PATCH] Auto-sync with upstream branch master Upstream commit: ac0353af81a23535f517586a5d04427120a157ac - This removes libpthread as a separate shared object. New programs will depend on the GLIBC_2.34 symbol version. Upstream development brings in the following noteworthy bug fixes: - ppc64le: scv ABI error handling fails to check IS_ERR_VALUE (#1962971) - CVE-2021-27645 glibc: Use-after-free in addgetnetgrentX function in netgroupcache.c (#1932590) - Linking the main program with jemalloc causes sysconf to deadlock in audit mode (#1909920) --- glibc-upstream-amx-detection.patch | 26 --------------- glibc-upstream-malloc-test-hang.patch | 31 ------------------ glibc.spec | 46 +++++++++++++-------------- sources | 2 +- 4 files changed, 24 insertions(+), 81 deletions(-) delete mode 100644 glibc-upstream-amx-detection.patch delete mode 100644 glibc-upstream-malloc-test-hang.patch diff --git a/glibc-upstream-amx-detection.patch b/glibc-upstream-amx-detection.patch deleted file mode 100644 index c2869d2..0000000 --- a/glibc-upstream-amx-detection.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit 7fc9152e831fb24091c0ceabdcecb9b07dd29dd6 -Author: H.J. Lu -Date: Wed Apr 21 18:40:08 2021 -0700 - - x86: tst-cpu-features-supports.c: Update AMX check - - Pass "amx-bf16", "amx-int8" and "amx-tile", instead of "amx_bf16", - "amx_int8" and "amx_tile", to __builtin_cpu_supports for GCC 11. - -diff --git a/sysdeps/x86/tst-cpu-features-supports.c b/sysdeps/x86/tst-cpu-features-supports.c -index ce78a7d8bcce75a4..a2cabc90beeb9530 100644 ---- a/sysdeps/x86/tst-cpu-features-supports.c -+++ b/sysdeps/x86/tst-cpu-features-supports.c -@@ -59,9 +59,9 @@ do_test (int argc, char **argv) - fails += CHECK_SUPPORTS (aes, AES); - #endif - #if __GNUC_PREREQ (11, 1) -- fails += CHECK_SUPPORTS (amx_bf16, AMX_BF16); -- fails += CHECK_SUPPORTS (amx_int8, AMX_INT8); -- fails += CHECK_SUPPORTS (amx_tile, AMX_TILE); -+ fails += CHECK_SUPPORTS (amx-bf16, AMX_BF16); -+ fails += CHECK_SUPPORTS (amx-int8, AMX_INT8); -+ fails += CHECK_SUPPORTS (amx-tile, AMX_TILE); - #endif - fails += CHECK_SUPPORTS (avx, AVX); - fails += CHECK_SUPPORTS (avx2, AVX2); diff --git a/glibc-upstream-malloc-test-hang.patch b/glibc-upstream-malloc-test-hang.patch deleted file mode 100644 index db691ac..0000000 --- a/glibc-upstream-malloc-test-hang.patch +++ /dev/null @@ -1,31 +0,0 @@ -commit 0a282de11b87fb4ad015c0cd10158555999705f9 -Author: Arjun Shankar -Date: Wed Apr 7 00:30:11 2021 +0200 - - malloc: Run tst-malloc-stats-cancellation via test-driver.c - - This allows the test to time out in case it hangs. - - Reviewed-by: Carlos O'Donell - -diff --git a/malloc/tst-malloc-stats-cancellation.c b/malloc/tst-malloc-stats-cancellation.c -index 9a8f475830b16af2..725cad6498f3cdf8 100644 ---- a/malloc/tst-malloc-stats-cancellation.c -+++ b/malloc/tst-malloc-stats-cancellation.c -@@ -91,8 +91,8 @@ buffer_threadproc (void *argp) - } - - --int --main (void) -+static int -+do_test (void) - { - int result = 0, err, real_stderr_fd, bufpipe[2]; - pthread_t t_thr, b_thr; -@@ -214,3 +214,5 @@ main (void) - } - return result; - } -+ -+#include diff --git a/glibc.spec b/glibc.spec index 2ac115d..abf3cdd 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.33.9000-114-gf01a61e138 +%define glibcsrcdir glibc-2.33.9000-642-gac0353af81 %define glibcversion 2.33.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -97,7 +97,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 8%{?dist} +Release: 9%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -170,8 +170,6 @@ Patch23: glibc-python3.patch Patch29: glibc-fedora-nsswitch.patch Patch30: glibc-deprecated-selinux-makedb.patch Patch31: glibc-deprecated-selinux-nscd.patch -Patch32: glibc-upstream-amx-detection.patch -Patch33: glibc-upstream-malloc-test-hang.patch ############################################################################## # Continued list of core "glibc" package information: @@ -1412,22 +1410,6 @@ mv -f %{glibc_sysroot}/%{_lib}/lib{pcprofile,memusage}.so \ # Strip all of the installed object files. strip -g %{glibc_sysroot}%{_libdir}/*.o -############################################################################### -# Rebuild libpthread.a using --whole-archive to ensure all of libpthread -# is included in a static link. This prevents any problems when linking -# statically, using parts of libpthread, and other necessary parts not -# being included. Upstream has decided that this is the wrong approach to -# this problem and that the full set of dependencies should be resolved -# such that static linking works and produces the most minimally sized -# static application possible. -############################################################################### -pushd %{glibc_sysroot}%{_prefix}/%{_lib}/ -$GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a -rm libpthread.a -ar rcs libpthread.a libpthread.o -rm libpthread.o -popd - # The xtrace and memusage scripts have hard-coded paths that need to be # translated to a correct set of paths using the $LIB token which is # dynamically translated by ld.so as the default lib directory. @@ -1604,9 +1586,14 @@ grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist >> glibc.filelist # glibc-devel ############################################################################### -# Put some static files into the devel package. +# Static libraries that land in glibc-devel, not glibc-static. +devel_static_library_pattern='/lib\(\(c\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\|pthread\)\.a$' +# Static libraries neither in glibc-devel nor in glibc-static. +other_static_library_pattern='/libpthread_nonshared\.a' + grep '%{_libdir}/lib.*\.a' master.filelist \ - | grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \ + | grep "$devel_static_library_pattern" \ + | grep -v "$other_static_library_pattern" \ > devel.filelist # Put all of the object files and *.so (not the versioned ones) into the @@ -1659,7 +1646,8 @@ grep '%{_prefix}/include' < master.filelist >> devel.filelist # Put the rest of the static files into the static package. grep '%{_libdir}/lib.*\.a' < master.filelist \ - | grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \ + | grep -v "$devel_static_library_pattern" \ + | grep -v "$other_static_library_pattern" \ > static.filelist ############################################################################### @@ -2124,6 +2112,18 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Tue May 25 2021 Florian Weimer - 2.33.9000-9 +- Auto-sync with upstream branch master, + commit ac0353af81a23535f517586a5d04427120a157ac. +- This removes libpthread as a separate shared object. New programs + will depend on the GLIBC_2.34 symbol version. Upstream development + brings in the following noteworthy bug fixes: +- ppc64le: scv ABI error handling fails to check IS_ERR_VALUE (#1962971) +- CVE-2021-27645 glibc: Use-after-free in addgetnetgrentX function in + netgroupcache.c (#1932590) +- Linking the main program with jemalloc causes sysconf to deadlock in + audit mode (#1909920) + * Fri May 21 2021 Florian Weimer - 2.33.9000-8 - Switch back to a unified glibc-headers package for downstream (#1940686) diff --git a/sources b/sources index 575cd9f..db98691 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.33.9000-114-gf01a61e138.tar.xz) = e32129b3255cadfda5c6bca4bf1c6a5d0bfd8e717c476457e011e320afd373ffb96bfc874b4159f4a6954b331151ea8aa45efc4d977f1dff2040394bcc898185 +SHA512 (glibc-2.33.9000-642-gac0353af81.tar.xz) = 29755bdd1854923255670c55152ebe7f0fe319f16365dc1b5ff22786aa4c2b89dde86075690beb8a5a606fea3a7e2663cd8dc6ffeae77dd7a848c5075766df89