rseq: Provide static branch for runtime debugging

Config based debug is rarely turned on and is not available easily when
things go wrong.

Provide a static branch to allow permanent integration of debug mechanisms
along with the usual toggles in Kconfig, command line and debugfs.

Requested-by: Peter Zijlstra <peterz@infradead.org>
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.089270547@linutronix.de
This commit is contained in:
Thomas Gleixner
2025-10-27 09:44:55 +01:00
committed by Ingo Molnar
parent 5412910487
commit 9c37cb6e80
4 changed files with 90 additions and 4 deletions

View File

@@ -1925,10 +1925,24 @@ config RSEQ_STATS
If unsure, say N.
config RSEQ_DEBUG_DEFAULT_ENABLE
default n
bool "Enable restartable sequences debug mode by default" if EXPERT
depends on RSEQ
help
This enables the static branch for debug mode of restartable
sequences.
This also can be controlled on the kernel command line via the
command line parameter "rseq_debug=0/1" and through debugfs.
If unsure, say N.
config DEBUG_RSEQ
default n
bool "Enable debugging of rseq() system call" if EXPERT
depends on RSEQ && DEBUG_KERNEL
select RSEQ_DEBUG_DEFAULT_ENABLE
help
Enable extra debugging checks for the rseq system call.