[PATCH v2 3/3] Linux: Add tests that check that TLS and rseq area are separate
Michael Jeanson
mjeanson@efficios.com
Mon Jan 13 18:45:20 GMT 2025
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));
+}
Thanks,
Michael
More information about the Libc-alpha
mailing list