[PATCH v2 3/3] Linux: Add tests that check that TLS and rseq area are separate
Florian Weimer
fweimer@redhat.com
Tue Jan 14 06:40:09 GMT 2025
* Michael Jeanson:
> On 2025-01-13 07:33, Florian Weimer wrote:
>> +static void
>> +add_rseq (void)
>> +{
>> + if (__rseq_size > 0)
>> + add_range ("", "rseq area",
>> + (char *) __thread_pointer () + __rseq_offset, __rseq_size);
>> +}
>
> Since there is always an rseq area of at least RSEQ_AREA_SIZE_INITIAL
> (32 bytes) allocated even when rseq is disabled, we should always add
> the range to the test, something like that :
>
> +static void
> +add_rseq (void)
> +{
> + add_range ("", "rseq area", (char *) __thread_pointer () + __rseq_offset,
> + MAX (__rseq_size, RSEQ_AREA_SIZE_INITIAL));
> +}
Or perhaps round up the size to a multiple of 32?
Thanks,
Florian
More information about the Libc-alpha
mailing list