[PATCH v16 0/8] Add rseq extensible ABI support
Florian Weimer
fweimer@redhat.com
Fri Jan 10 18:08:04 GMT 2025
* Michael Jeanson:
> Introduced in Linux v6.3 the rseq extensible ABI [1] will allow adding
> rseq features past the initial 32 bytes of the original ABI.
>
> While the rseq features in the latest kernel still fit within the
> original ABI size, there are currently only 4 bytes left. It would thus
> be a good time to add support for the extensible ABI so that when new
> features are added, they are immediately available to GNU libc users.
>
> We use the ELF auxiliary vector to query the kernel for the size and
> alignment of the rseq area, if this fails we default to the original
> fixed size and alignment of '32' which the kernel will accept as a
> compatibility mode with the original ABI.
>
> This makes the size of the rseq area variable and thus requires to
> relocate it out of 'struct pthread'. We chose to move it after (in block
> allocation order) the last TLS block inside the static TLS block
> allocation. It required a fairly small modification to the TLS block
> allocator and did not interfere with the main executable TLS block which
> must always be the first block relative to the thread pointer.
>
> [1] https://lore.kernel.org/all/20221122203932.231377-4-mathieu.desnoyers@efficios.com/
I've just sent another patch that is a prerequisite for this series now
(on m68k, mips, riscv):
[PATCH] Add missing include guards to <dl-tls.h>
<https://inbox.sourceware.org/libc-alpha/875xmmtukv.fsf@oldenburg.str.redhat.com/>
I think you saw similar problems before?
Thanks,
Florian
More information about the Libc-alpha
mailing list