]> git.ipfire.org Git - thirdparty/glibc.git/commit
nptl: initialize rseq area prior to registration
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 7 Nov 2024 21:23:49 +0000 (22:23 +0100)
committerMichael Jeanson <mjeanson@efficios.com>
Fri, 6 Dec 2024 16:11:31 +0000 (16:11 +0000)
commit47d70ca8d9448d0d742591c9d8bf91564116e68f
tree1671964fe5b60e27e1402cb30ba2c80ee3fbfce2
parent37214df5f103f4075cf0a79a227e70f3e064701c
nptl: initialize rseq area prior to registration

Per the rseq syscall documentation, 3 fields are required to be
initialized by userspace prior to registration, they are 'cpu_id',
'rseq_cs' and 'flags'. Since we have no guarantee that 'struct pthread'
is cleared on all architectures, explicitly set those 3 fields prior to
registration.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
(cherry picked from commit 97f60abd25628425971f07e9b0e7f8eec0741235)
nptl/descr.h
sysdeps/unix/sysv/linux/rseq-internal.h