mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
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>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user