[PATCH v10 4/4] nptl: Add features to internal 'struct rseq_area'
Michael Jeanson
mjeanson@efficios.com
Mon Mar 25 18:29:27 GMT 2024
The 'struct rseq_area' is used to define the offset of the various
features available in the rseq ABI. Add fields that follow cpu_id
(rseq_cs, flags, node_id, mm_cid) in preparation for their use.
Access to features following the original rseq ABI 20 bytes (after
'flags') starting with 'node_id' must be gated by an rseq feature size
test.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
---
sysdeps/unix/sysv/linux/rseq-internal.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/rseq-internal.h b/sysdeps/unix/sysv/linux/rseq-internal.h
index 4123072274..da98e44dad 100644
--- a/sysdeps/unix/sysv/linux/rseq-internal.h
+++ b/sysdeps/unix/sysv/linux/rseq-internal.h
@@ -28,13 +28,17 @@
#include <ldsodefs.h>
/* rseq area registered with the kernel. Use a custom definition
- here to isolate from kernel struct rseq changes. The
- implementation of sched_getcpu needs acccess to the cpu_id field;
- the other fields are unused and not included here. */
+ here to isolate from kernel struct rseq changes. Access to fields
+ beyond the 20 bytes of the original ABI (after 'flags') must be gated
+ by a check of the feature size. */
struct rseq_area
{
uint32_t cpu_id_start;
uint32_t cpu_id;
+ uint64_t rseq_cs;
+ uint32_t flags;
+ uint32_t node_id;
+ uint32_t mm_cid;
};
static inline struct rseq_area *
--
2.34.1
More information about the Libc-alpha
mailing list