aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/nptl/dl-tls_init_tp.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2024-07-08 21:14:00 +0200
committerFlorian Weimer <fweimer@redhat.com>2024-07-09 19:33:37 +0200
commit2e456ccf0c34a056e3ccafac4a0c7effef14d918 (patch)
treef8850016fc638b37f5edb32a729bb023d8084fa6 /sysdeps/nptl/dl-tls_init_tp.c
parent7e7f35278cf5980f6eb1ddd384217a04a5293bc8 (diff)
downloadglibc-2e456ccf0c34a056e3ccafac4a0c7effef14d918.zip
glibc-2e456ccf0c34a056e3ccafac4a0c7effef14d918.tar.gz
glibc-2e456ccf0c34a056e3ccafac4a0c7effef14d918.tar.bz2
Linux: Make __rseq_size useful for feature detection (bug 31965)
The __rseq_size value is now the active area of struct rseq (so 20 initially), not the full struct size including padding at the end (32 initially). Update misc/tst-rseq to print some additional diagnostics. Reviewed-by: Michael Jeanson <mjeanson@efficios.com> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Diffstat (limited to 'sysdeps/nptl/dl-tls_init_tp.c')
-rw-r--r--sysdeps/nptl/dl-tls_init_tp.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sysdeps/nptl/dl-tls_init_tp.c b/sysdeps/nptl/dl-tls_init_tp.c
index 7eb35fb..7803e19 100644
--- a/sysdeps/nptl/dl-tls_init_tp.c
+++ b/sysdeps/nptl/dl-tls_init_tp.c
@@ -46,10 +46,6 @@ rtld_mutex_dummy (pthread_mutex_t *lock)
const unsigned int __rseq_flags;
-/* The variables are in .data.relro but are not yet write-protected. */
-extern unsigned int _rseq_size attribute_hidden;
-extern ptrdiff_t _rseq_offset attribute_hidden;
-
void
__tls_pre_init_tp (void)
{
@@ -106,9 +102,7 @@ __tls_init_tp (void)
bool do_rseq = true;
do_rseq = TUNABLE_GET (rseq, int, NULL);
if (rseq_register_current_thread (pd, do_rseq))
- {
- _rseq_size = sizeof (pd->rseq_area);
- }
+ _rseq_size = RSEQ_AREA_SIZE_INITIAL_USED;
#ifdef RSEQ_SIG
/* This should be a compile-time constant, but the current