glibc/sysdeps/x86_64/nptl
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
..
Makefile Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pthread-offsets.h nptl: Add tests for internal pthread_rwlock_t offsets 2019-11-26 13:53:36 +00:00
pthread_mutex_backoff.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pthread_spin_init.c
pthread_spin_lock.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pthread_spin_trylock.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pthread_spin_unlock.S Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
rseq-access.h x86-64: Cast __rseq_offset to long long int [BZ #32543] 2025-01-12 07:08:27 +08:00
tcb-access.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tcb-offsets.sym nptl: Fix Race conditions in pthread cancellation [BZ#12683] 2024-08-23 14:27:43 -03:00
tls.h Revert "x86_64: Remove unused padding from tcbhead_t" 2025-01-07 09:17:01 +01:00
tst-x86-64-tls-1.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00