[PATCH v16 6/8] nptl: Move the rseq area to the 'extra TLS' block
Florian Weimer
fweimer@redhat.com
Fri Jan 10 19:39:11 GMT 2025
* Michael Jeanson:
> +#if TLS_TCB_AT_TP
> + /* The rseq area block should come before the thread pointer and be at least
> + 32 bytes. */
> + TEST_VERIFY (__rseq_offset <= -RSEQ_AREA_SIZE_INITIAL);
> +
> + /* The rseq area block should come before TLS variables. */
> + TEST_VERIFY ((intptr_t) rseq_abi < (intptr_t) &tls_var);
> +#elif TLS_DTV_AT_TP
> + /* The rseq area block should come after the TCB, add the TLS block offset to
> + the rseq offset to get a value relative to the TCB and test that it's
> + non-negative. */
> + TEST_VERIFY (__rseq_offset + TLS_TP_OFFSET >= 0);
> +
> + /* The rseq area block should come after TLS variables. */
> + TEST_VERIFY ((intptr_t) rseq_abi > (intptr_t) &tls_var);
> +#else
> +# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
> +#endif
Looks good now. Rest is okay as well.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Thanks,
Florian
More information about the Libc-alpha
mailing list