diff options
author | Michael Jeanson <mjeanson@efficios.com> | 2024-11-20 14:15:42 -0500 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2024-11-25 19:42:14 +0100 |
commit | d9f40387d3305d97e30a8cf8724218c42a63680a (patch) | |
tree | 8b75a4c7e8e106efba07044de12ca19d072c255b | |
parent | 6976cd3124c0bb7ef55b6eb23ac0cb12ac514138 (diff) | |
download | glibc-d9f40387d3305d97e30a8cf8724218c42a63680a.zip glibc-d9f40387d3305d97e30a8cf8724218c42a63680a.tar.gz glibc-d9f40387d3305d97e30a8cf8724218c42a63680a.tar.bz2 |
nptl: initialize cpu_id_start prior to rseq registration
When adding explicit initialization of rseq fields prior to
registration, I glossed over the fact that 'cpu_id_start' is also
documented as initialized by user-space.
While current kernels don't validate the content of this field on
registration, future ones could.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-rw-r--r-- | sysdeps/unix/sysv/linux/rseq-internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/rseq-internal.h b/sysdeps/unix/sysv/linux/rseq-internal.h index 37a8f63..ef3eab1 100644 --- a/sysdeps/unix/sysv/linux/rseq-internal.h +++ b/sysdeps/unix/sysv/linux/rseq-internal.h @@ -56,6 +56,7 @@ rseq_register_current_thread (struct pthread *self, bool do_rseq) registration, there is no guarantee that struct pthread is cleared on all architectures. */ THREAD_SETMEM (self, rseq_area.cpu_id, RSEQ_CPU_ID_UNINITIALIZED); + THREAD_SETMEM (self, rseq_area.cpu_id_start, 0); THREAD_SETMEM (self, rseq_area.rseq_cs, 0); THREAD_SETMEM (self, rseq_area.flags, 0); |