7e7241f620
Upstream commit: 808a84a8b81468b517a4d721fdc62069cb8c211f - Fix underallocation of abort_msg_s struct (CVE-2025-0395) - x86/string: Fixup alignment of main loop in str{n}cmp-evex [BZ #32212] - x86: Improve large memset perf with non-temporal stores [RHEL-29312] - x86: Avoid integer truncation with large cache sizes (bug 32470) - math: Exclude internal math symbols for tests [BZ #32414] - malloc: add indirection for malloc(-like) functions in tests [BZ #32366] - Pass -nostdlib -nostartfiles together with -r [BZ #31753] - nptl: initialize cpu_id_start prior to rseq registration - nptl: initialize rseq area prior to registration
30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
commit 350db2839387659e1500a54d276e401c9c6b2dee
|
|
Author: Michael Jeanson <mjeanson@efficios.com>
|
|
Date: Wed Nov 20 14:15:42 2024 -0500
|
|
|
|
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>
|
|
(cherry picked from commit d9f40387d3305d97e30a8cf8724218c42a63680a)
|
|
|
|
diff --git a/sysdeps/unix/sysv/linux/rseq-internal.h b/sysdeps/unix/sysv/linux/rseq-internal.h
|
|
index 37a8f630b6519ff0..ef3eab1fefd4d90d 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);
|
|
|