1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

nptl: Move the rseq area to the 'extra TLS' block

Move the rseq area to the newly added 'extra TLS' block, this is the
last step in adding support for the rseq extended ABI. The size of the
rseq area is now dynamic and depends on the rseq features reported by
the kernel through the elf auxiliary vector. This will allow
applications to use rseq features past the 32 bytes of the original rseq
ABI as they become available in future kernels.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
Michael Jeanson
2024-07-10 15:48:49 -04:00
parent 494d65129e
commit 93d0bfbe8f
12 changed files with 207 additions and 59 deletions

View File

@@ -61,15 +61,9 @@ void _dl_parse_auxv (ElfW(auxv_t) *av, dl_parse_auxv_t auxv_values)
#endif
/* Get the rseq feature size, with a minimum of RSEQ_AREA_SIZE_INITIAL_USED
(20) for kernels that don't have AT_RSEQ_FEATURE_SIZE. Limit the feature
size to RSEQ_AREA_SIZE_MAX_USED (28) which fits the rseq area in 'struct
pthread' and represents the maximum feature size of currently released
kernels. Since no kernels currently cross the 32 bytes of the original
ABI, the semantics of a feature size of 32 or more are still undetermined.
*/
_rseq_size = MIN (MAX (auxv_values[AT_RSEQ_FEATURE_SIZE],
RSEQ_AREA_SIZE_INITIAL_USED),
RSEQ_AREA_SIZE_MAX_USED);
(20) for kernels that don't have AT_RSEQ_FEATURE_SIZE. */
_rseq_size = MAX (auxv_values[AT_RSEQ_FEATURE_SIZE],
RSEQ_AREA_SIZE_INITIAL_USED);
_rseq_align = MAX (auxv_values[AT_RSEQ_ALIGN], RSEQ_MIN_ALIGN);
DL_PLATFORM_AUXV