selftests/rseq: Implement rseq mm_cid field support

Add support for the mm_cid field (per-memory-map concurrency ID) of
struct rseq to rseq selftests.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221122203932.231377-11-mathieu.desnoyers@efficios.com
This commit is contained in:
Mathieu Desnoyers
2022-11-22 15:39:12 -05:00
committed by Peter Zijlstra
parent 72cb1d7f2f
commit 18c2355838
2 changed files with 19 additions and 0 deletions

View File

@@ -155,6 +155,15 @@ struct rseq_abi {
*/
__u32 node_id;
/*
* Restartable sequences mm_cid field. Updated by the kernel. Read by
* user-space with single-copy atomicity semantics. This field should
* only be read by the thread which registered this data structure.
* Aligned on 32-bit. Contains the current thread's concurrency ID
* (allocated uniquely within a memory map).
*/
__u32 mm_cid;
/*
* Flexible array member at end of structure, after last feature field.
*/