aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2025-10-27 09:44:50 +0100
committerIngo Molnar <mingo@kernel.org>2025-11-04 08:32:35 +0100
commitdab344753e021fe84c24f9d8b0b63cb5bcf463d7 (patch)
tree62f1826e29f28d66e2b2f9d1a95233a9a61159ea /kernel
parentrseq: Record interrupt from user space (diff)
downloadlinux-dab344753e021fe84c24f9d8b0b63cb5bcf463d7.tar.gz
linux-dab344753e021fe84c24f9d8b0b63cb5bcf463d7.zip
rseq: Provide tracepoint wrappers for inline code
Provide tracepoint wrappers for the upcoming RSEQ exit to user space inline fast path, so that the header can be safely included by code which defines actual trace points. 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.967114316@linutronix.de
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rseq.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/kernel/rseq.c b/kernel/rseq.c
index ad1e7cecd527..f49d3118c3e0 100644
--- a/kernel/rseq.c
+++ b/kernel/rseq.c
@@ -70,7 +70,7 @@
#include <linux/sched.h>
#include <linux/uaccess.h>
#include <linux/syscalls.h>
-#include <linux/rseq.h>
+#include <linux/rseq_entry.h>
#include <linux/types.h>
#include <linux/ratelimit.h>
#include <asm/ptrace.h>
@@ -91,6 +91,23 @@
RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL | \
RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE)
+#ifdef CONFIG_TRACEPOINTS
+/*
+ * Out of line, so the actual update functions can be in a header to be
+ * inlined into the exit to user code.
+ */
+void __rseq_trace_update(struct task_struct *t)
+{
+ trace_rseq_update(t);
+}
+
+void __rseq_trace_ip_fixup(unsigned long ip, unsigned long start_ip,
+ unsigned long offset, unsigned long abort_ip)
+{
+ trace_rseq_ip_fixup(ip, start_ip, offset, abort_ip);
+}
+#endif /* CONFIG_TRACEPOINTS */
+
#ifdef CONFIG_DEBUG_RSEQ
static struct rseq *rseq_kernel_fields(struct task_struct *t)
{