[PATCH] x86-64: Move nptl/rseq-access.h to nptl/64 [BZ #32543]

Andreas K. Huettel dilfridge@gentoo.org
Sat Jan 11 13:58:30 GMT 2025


Since i386/nptl/rseq-access.h (which has only one ABI) and x86_64/nptl/rseq-access.h
are the only non-generic versions of this file, 

am I assuming correctly that we should *not* expect any surprises from exotic ABI on
other types of machines (say 31bit s390 or mips n32)?

Cheers, 
Andreas

Am Samstag, 11. Januar 2025, 06:20:42 Mitteleuropäische Normalzeit schrieb H.J. Lu:
> commit 494d65129ed5ae1154b75cc189bbdde5e9ecf1df
> 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)
> 
> Move x86_64/nptl/rseq-access.h to x86_64/nptl/64/rseq-access.h so that
> sysdeps/nptl/rseq-access.h is used for x32.  This fixes BZ #32543.
> 
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> ---
>  sysdeps/x86_64/nptl/{ => 64}/rseq-access.h | 0
>  1 file changed, 0 insertions(+), 0 deletions(-)
>  rename sysdeps/x86_64/nptl/{ => 64}/rseq-access.h (100%)
> 
> diff --git a/sysdeps/x86_64/nptl/rseq-access.h b/sysdeps/x86_64/nptl/64/rseq-access.h
> similarity index 100%
> rename from sysdeps/x86_64/nptl/rseq-access.h
> rename to sysdeps/x86_64/nptl/64/rseq-access.h
> 


-- 
Andreas K. Hüttel
dilfridge@gentoo.org
Gentoo Linux developer
(council, toolchain, base-system, perl, libreoffice)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 981 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250111/c72283a7/attachment.sig>


More information about the Libc-alpha mailing list