glibc/sysdeps
Florian Weimer 71fcdba577 linux: Use rseq area unconditionally in sched_getcpu (bug 31479)
Originally, nptl/descr.h included <sys/rseq.h>, but we removed that
in commit 2c6b4b272e ("nptl:
Unconditionally use a 32-byte rseq area").  After that, it was
not ensured that the RSEQ_SIG macro was defined during sched_getcpu.c
compilation that provided a definition.  This commit always checks
the rseq area for CPU number information before using the other
approaches.

This adds an unnecessary (but well-predictable) branch on
architectures which do not define RSEQ_SIG, but its cost is small
compared to the system call.  Most architectures that have vDSO
acceleration for getcpu also have rseq support.

Fixes: 2c6b4b272e
Fixes: 1d350aa060
Reviewed-by: Arjun Shankar <arjun@redhat.com>
(cherry picked from commit 7a76f21867)
2024-03-18 11:28:19 +01:00
..
aarch64 aarch64: Make cpu-features definitions not Linux-specific 2024-01-04 23:48:54 +01:00
alpha Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
arc Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
arm arm: Remove wrong ldr from _dl_start_user (BZ 31339) 2024-02-05 15:43:39 -03:00
csky Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
generic Make __getrandom_nocancel set errno and add a _nostatus version 2024-01-12 14:23:11 +01:00
gnu Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hppa Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
htl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurd Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
i386 math: remove exp10 wrappers 2024-01-12 16:02:12 +00:00
ieee754 math: remove exp10 wrappers 2024-01-12 16:02:12 +00:00
loongarch Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
m68k math: remove exp10 wrappers 2024-01-12 16:02:12 +00:00
mach Make __getrandom_nocancel set errno and add a _nostatus version 2024-01-12 14:23:11 +01:00
microblaze Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mips math: Update mips64 ulps 2024-02-22 21:29:26 +01:00
nios2 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
nptl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
or1k Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
posix Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
powerpc Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
pthread Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
riscv riscv: add support for static PIE 2024-01-22 14:58:23 +01:00
s390 S390: Fix building with --disable-mutli-arch [BZ #31196] 2024-01-30 22:28:51 +01:00
sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sparc sparc: Fix sparc64 memmove length comparison (BZ 31266) 2024-01-22 09:34:50 -03:00
unix linux: Use rseq area unconditionally in sched_getcpu (bug 31479) 2024-03-18 11:28:19 +01:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x86 x86-64: Check if mprotect works before rewriting PLT 2024-01-15 06:59:23 -08:00
x86_64 x86-64: Check if mprotect works before rewriting PLT 2024-01-15 06:59:23 -08:00