rseq: Simplify the event notification
authorThomas Gleixner <tglx@linutronix.de>
Mon, 27 Oct 2025 08:44:26 +0000 (09:44 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Nov 2025 07:30:09 +0000 (08:30 +0100)
commitd923739e2e356424cc566143a3323c62cd6ed067
treebf852569d2a610de7c98b934374f47665a9a603b
parent067b3b41b4dd5bf51d6874206f5c1f72e0684eeb
rseq: Simplify the event notification

Since commit 0190e4198e47 ("rseq: Deprecate RSEQ_CS_FLAG_NO_RESTART_ON_*
flags") the bits in task::rseq_event_mask are meaningless and just extra
work in terms of setting them individually.

Aside of that the only relevant point where an event has to be raised is
context switch. Neither the CPU nor MM CID can change without going through
a context switch.

Collapse them all into a single boolean which simplifies the code a lot and
remove the pointless invocations which have been sprinkled all over the
place for no value.

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/20251027084306.336978188@linutronix.de
fs/exec.c
include/linux/rseq.h
include/linux/sched.h
include/uapi/linux/rseq.h
kernel/rseq.c
kernel/sched/core.c
kernel/sched/membarrier.c