glibc/sysdeps
H.J. Lu 0b6ad02b33 x86-64: Cast __rseq_offset to long long int [BZ #32543]
commit 494d65129e
Author: Michael Jeanson <mjeanson@efficios.com>
Date:   Thu Aug 1 10:35:34 2024 -0400

    nptl: Introduce <rseq-access.h> for RSEQ_* accessors

added things like

       asm volatile ("movl %%fs:%P1(%q2),%0"                                  \
                     : "=r" (__value)                                         \
                     : "i" (offsetof (struct rseq_area, member)),             \
                       "r" (__rseq_offset));				      \

But this doesn't work for x32 when __rseq_offset is negative since the
address is computed as

FS + 32-bit to 64-bit zero extension of __rseq_offset
+ offsetof (struct rseq_area, member)

Cast __rseq_offset to long long int

                       "r" ((long long int) __rseq_offset));		      \

to sign-extend 32-bit __rseq_offset to 64-bit.  This is a no-op for x86-64
since x86-64 __rseq_offset is 64-bit.  This fixes BZ #32543.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-01-12 07:08:27 +08:00
..
aarch64 math: Fix acosf when building with gcc <= 11 2025-01-09 12:53:58 -03:00
alpha math: update alpha ulps 2025-01-05 20:02:53 +01:00
arc elf: Introduce generic <dl-tls.h> 2025-01-02 13:45:27 +01:00
arm Rename have-mtls-descriptor to have-test-mtls-descriptor 2025-01-04 04:51:21 +08:00
csky Move <thread_pointer.h> to kernel-independent sysdeps directories 2025-01-09 19:30:16 +01:00
generic Add generic 'extra TLS' 2025-01-10 20:19:28 +00:00
gnu Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
hppa Move <thread_pointer.h> to kernel-independent sysdeps directories 2025-01-09 19:30:16 +01:00
htl htl: move pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling into libc. 2025-01-02 01:20:21 +01:00
hurd Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
i386 nptl: Introduce <rseq-access.h> for RSEQ_* accessors 2025-01-10 20:20:17 +00:00
ieee754 math: Fix acosf when building with gcc <= 11 2025-01-09 12:53:58 -03:00
loongarch Move <thread_pointer.h> to kernel-independent sysdeps directories 2025-01-09 19:30:16 +01:00
m68k Add missing include guards to <dl-tls.h> 2025-01-10 19:02:47 +01:00
mach hurd: Mark more memory-hungry tests as unsupported 2025-01-11 04:17:38 +01:00
microblaze Move <thread_pointer.h> to kernel-independent sysdeps directories 2025-01-09 19:30:16 +01:00
mips Add missing include guards to <dl-tls.h> 2025-01-10 19:02:47 +01:00
nptl nptl: Move the rseq area to the 'extra TLS' block 2025-01-10 20:20:27 +00:00
or1k Move <thread_pointer.h> to kernel-independent sysdeps directories 2025-01-09 19:30:16 +01:00
posix Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
powerpc Move <thread_pointer.h> to kernel-independent sysdeps directories 2025-01-09 19:30:16 +01:00
pthread Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
riscv Add missing include guards to <dl-tls.h> 2025-01-10 19:02:47 +01:00
s390 Add missing include guards to <dl-tls.h> 2025-01-10 19:02:47 +01:00
sh elf: Introduce generic <dl-tls.h> 2025-01-02 13:45:27 +01:00
sparc Move <thread_pointer.h> to kernel-independent sysdeps directories 2025-01-09 19:30:16 +01:00
unix Linux: Update internal copy of '<sys/rseq.h>' 2025-01-10 20:20:48 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
x86 x86: Add missing #include <features.h> to <thread_pointer.h> 2025-01-09 19:30:41 +01:00
x86_64 x86-64: Cast __rseq_offset to long long int [BZ #32543] 2025-01-12 07:08:27 +08:00