summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2025-10-27 09:45:05 +0100
committerIngo Molnar <mingo@kernel.org>2025-11-04 08:33:27 +0100
commiteaa9088d568c84afd72fa32dbe01833aef861d0d (patch)
treeda527c2c77813f936a790f138d771d713be1880f /kernel
parentc1cbad8f99b5c73c6af6e96acbfa64eaaaeb085f (diff)
rseq: Use static branch for syscall exit debug when GENERIC_IRQ_ENTRY=y
Make the syscall exit debug mechanism available via the static branch on architectures which utilize the generic entry code. 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.333440475@linutronix.de
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rseq.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/rseq.c b/kernel/rseq.c
index abd6bfadbcc6..97631554ae96 100644
--- a/kernel/rseq.c
+++ b/kernel/rseq.c
@@ -473,12 +473,11 @@ error:
force_sigsegv(sig);
}
-#ifdef CONFIG_DEBUG_RSEQ
/*
* Terminate the process if a syscall is issued within a restartable
* sequence.
*/
-void rseq_syscall(struct pt_regs *regs)
+void __rseq_debug_syscall_return(struct pt_regs *regs)
{
struct task_struct *t = current;
u64 csaddr;
@@ -496,6 +495,13 @@ void rseq_syscall(struct pt_regs *regs)
fail:
force_sig(SIGSEGV);
}
+
+#ifdef CONFIG_DEBUG_RSEQ
+/* Kept around to keep GENERIC_ENTRY=n architectures supported. */
+void rseq_syscall(struct pt_regs *regs)
+{
+ __rseq_debug_syscall_return(regs);
+}
#endif
/*