Message ID | 20240227155533.298617-5-mjeanson@efficios.com |
---|---|
State | New |
Headers | show |
Series | Extend rseq support | expand |
Michael Jeanson <mjeanson@efficios.com> writes: > 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> LGTM Reviewed-by: DJ Delorie <dj@redhat.com>
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 *
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(-)