[PATCH v16 0/8] Add rseq extensible ABI support
Florian Weimer
fweimer@redhat.com
Fri Jan 10 19:40:33 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/
>
> Cc: Florian Weimer <fweimer@redhat.com>
> Cc: Carlos O'Donell <carlos@redhat.com>
> Cc: DJ Delorie <dj@redhat.com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
I've pushed my <dl-tls.h> cleanup, and posted my reviews.
I think this is now ready to go in. Thank you for being persistent, I
know it took a long time.
Florian
More information about the Libc-alpha
mailing list