linux-kernelorg-stable/include
Thomas Gleixner 0f085b4188 rseq: Provide and use rseq_set_ids()
Provide a new and straight forward implementation to set the IDs (CPU ID,
Node ID and MM CID), which can be later inlined into the fast path.

It does all operations in one scoped_user_rw_access() section and retrieves
also the critical section member (rseq::cs_rseq) from user space to avoid
another user..begin/end() pair. This is in preparation for optimizing the
fast path to avoid extra work when not required.

On rseq registration set the CPU ID fields to RSEQ_CPU_ID_UNINITIALIZED and
node and MM CID to zero. That's the same as the kernel internal reset
values. That makes the debug validation in the exit code work correctly on
the first exit to user space.

Use it to replace the whole related zoo in rseq.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20251027084307.393972266@linutronix.de
2025-11-04 08:33:33 +01:00
..
acpi
asm-generic kbuild: align modinfo section for Secureboot Authenticode EDK2 compat 2025-10-27 16:21:24 -07:00
clocksource
crypto
cxl
drm
dt-bindings
hyperv
keys
kunit
kvm
linux rseq: Provide and use rseq_set_ids() 2025-11-04 08:33:33 +01:00
math-emu
media
memory
misc
net net: tls: Cancel RX async resync request on rcd_delta overflow 2025-10-29 18:32:18 -07:00
pcmcia
ras
rdma
rv
scsi
soc
sound
target
trace rseq: Cache CPU ID and MM CID values 2025-11-04 08:32:14 +01:00
uapi rseq: Simplify the event notification 2025-11-04 08:30:09 +01:00
ufs
vdso
video
xen
Kbuild