Auto-sync with upstream branch master

Upstream commit: 271ec55d0ae795f03d92e3aa61bff69a31a19e3a

- support: Do not build xpthread_attr_setaffinity_np for hurd
- nptl: Add pthread_attr_setaffinity_np failure test
- support: Add xpthread_attr_setaffinity_np wrapper
- nptl: Move createthread to pthread_create
- nptl: Move Linux createthread to nptl
- nptl: Install SIGSETXID handler with SA_ONSTACK [BZ #27914]
- aarch64: Added optimized memset for A64FX
- aarch64: Added optimized memcpy and memmove for A64FX
- benchtests: Fixed bench-memcpy-random: buf1: mprotect failed
- aarch64: Added Vector Length Set test helper script
- aarch64: define BTI_C and BTI_J macros as NOP unless HAVE_AARCH64_BTI
- config: Added HAVE_AARCH64_SVE_ASM for aarch64
- tst-mallinfo2.c: Use correct multiple for total variable
This commit is contained in:
Florian Weimer 2021-05-31 10:11:56 +02:00
parent 65fd804c4a
commit d0b9f50b05
3 changed files with 21 additions and 40 deletions

View File

@ -1,36 +0,0 @@
Emergency backport of this change prior to upstream acceptance:
Author: Florian Weimer <fweimer@redhat.com>
Date: Wed May 26 07:13:00 2021 +0200
nptl: Install SIGSETXID handler with SA_ONSTACK [BZ #27914]
The signal is sent to all threads, some of which may have switched
to very small stacks. If they have also installed an alternate
signal stack, SA_ONSTACK makes this work. The Go runtime needs this:
runtime: C.setuid/C.setgid smashes Go stack
<https://github.com/golang/go/issues/9400>
Doing this for SIGCANCEL is less obviously beneficial and needs further
testing.
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 5680687efe7089da..b7073a828549d24c 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -83,9 +83,12 @@ late_init (void)
(void) __libc_sigaction (SIGCANCEL, &sa, NULL);
}
- /* Install the handle to change the threads' uid/gid. */
+ /* Install the handle to change the threads' uid/gid. Use
+ SA_ONSTACK because the signal may be sent to threads that are
+ running with custom stacks. (This is less likely for
+ SIGCANCEL.) */
sa.sa_sigaction = __nptl_setxid_sighandler;
- sa.sa_flags = SA_SIGINFO | SA_RESTART;
+ sa.sa_flags = SA_ONSTACK | SA_SIGINFO | SA_RESTART;
(void) __libc_sigaction (SIGSETXID, &sa, NULL);
/* The parent process might have left the signals blocked. Just in

View File

@ -1,4 +1,4 @@
%define glibcsrcdir glibc-2.33.9000-642-gac0353af81 %define glibcsrcdir glibc-2.33.9000-655-g271ec55d0a
%define glibcversion 2.33.9000 %define glibcversion 2.33.9000
# Pre-release tarballs are pulled in from git using a command that is # Pre-release tarballs are pulled in from git using a command that is
# effectively: # effectively:
@ -97,7 +97,7 @@
Summary: The GNU libc libraries Summary: The GNU libc libraries
Name: glibc Name: glibc
Version: %{glibcversion} Version: %{glibcversion}
Release: 10%{?dist} Release: 11%{?dist}
# In general, GPLv2+ is used by programs, LGPLv2+ is used for # In general, GPLv2+ is used by programs, LGPLv2+ is used for
# libraries. # libraries.
@ -170,7 +170,6 @@ Patch23: glibc-python3.patch
Patch29: glibc-fedora-nsswitch.patch Patch29: glibc-fedora-nsswitch.patch
Patch30: glibc-deprecated-selinux-makedb.patch Patch30: glibc-deprecated-selinux-makedb.patch
Patch31: glibc-deprecated-selinux-nscd.patch Patch31: glibc-deprecated-selinux-nscd.patch
Patch32: glibc-sigsetxid-sa_onstack.patch
############################################################################## ##############################################################################
# Continued list of core "glibc" package information: # Continued list of core "glibc" package information:
@ -2113,6 +2112,24 @@ fi
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
%changelog %changelog
* Mon May 31 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-11
- glibc-sigsetxid-sa_onstack.patch was applied upstream
- Auto-sync with upstream branch master,
commit 271ec55d0ae795f03d92e3aa61bff69a31a19e3a:
- support: Do not build xpthread_attr_setaffinity_np for hurd
- nptl: Add pthread_attr_setaffinity_np failure test
- support: Add xpthread_attr_setaffinity_np wrapper
- nptl: Move createthread to pthread_create
- nptl: Move Linux createthread to nptl
- nptl: Install SIGSETXID handler with SA_ONSTACK [BZ #27914]
- aarch64: Added optimized memset for A64FX
- aarch64: Added optimized memcpy and memmove for A64FX
- benchtests: Fixed bench-memcpy-random: buf1: mprotect failed
- aarch64: Added Vector Length Set test helper script
- aarch64: define BTI_C and BTI_J macros as NOP unless HAVE_AARCH64_BTI
- config: Added HAVE_AARCH64_SVE_ASM for aarch64
- tst-mallinfo2.c: Use correct multiple for total variable
* Wed May 26 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-10 * Wed May 26 2021 Florian Weimer <fweimer@redhat.com> - 2.33.9000-10
- nptl: Install SIGSETXID handler with SA_ONSTACK [BZ #27914] - nptl: Install SIGSETXID handler with SA_ONSTACK [BZ #27914]

View File

@ -1 +1 @@
SHA512 (glibc-2.33.9000-642-gac0353af81.tar.xz) = 29755bdd1854923255670c55152ebe7f0fe319f16365dc1b5ff22786aa4c2b89dde86075690beb8a5a606fea3a7e2663cd8dc6ffeae77dd7a848c5075766df89 SHA512 (glibc-2.33.9000-655-g271ec55d0a.tar.xz) = 7d1605ed459aa2ff389946d600af298c671fa0e06d849ef2f5e352372e0f1775cb8ae6fbfe52edde7314b3077078e4f501d41a7d238033c226b104b129322b76