summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/probes/kprobes_trampoline.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/probes/kprobes_trampoline.S')
-rw-r--r--arch/arm64/kernel/probes/kprobes_trampoline.S20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm64/kernel/probes/kprobes_trampoline.S b/arch/arm64/kernel/probes/kprobes_trampoline.S
new file mode 100644
index 000000000000..b60739d3983f
--- /dev/null
+++ b/arch/arm64/kernel/probes/kprobes_trampoline.S
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * trampoline entry and return code for kretprobes.
+ */
+
+#include <linux/linkage.h>
+#include <asm/asm-bug.h>
+#include <asm/assembler.h>
+
+ .text
+
+SYM_CODE_START(__kretprobe_trampoline)
+ /*
+ * Trigger a breakpoint exception. The PC will be adjusted by
+ * kretprobe_brk_handler(), and no subsequent instructions will
+ * be executed from the trampoline.
+ */
+ brk #KRETPROBES_BRK_IMM
+ ASM_BUG()
+SYM_CODE_END(__kretprobe_trampoline)