summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/kprobes.h
diff options
context:
space:
mode:
authorWilliam Cohen <wcohen@redhat.com>2016-07-08 19:35:52 +0300
committerCatalin Marinas <catalin.marinas@arm.com>2016-07-19 17:03:22 +0300
commitda6a91252ad98d49b49e83b76c1f032cdf6e5258 (patch)
tree725a7b6d7c2b67a7b90e2270f04a0303232a9cc3 /arch/arm64/include/asm/kprobes.h
parent39a67d49ba353630d144a8eb775500c041c89e7a (diff)
downloadlinux-da6a91252ad98d49b49e83b76c1f032cdf6e5258.tar.xz
arm64: Add trampoline code for kretprobes
The trampoline code is used by kretprobes to capture a return from a probed function. This is done by saving the registers, calling the handler, and restoring the registers. The code then returns to the original saved caller return address. It is necessary to do this directly instead of using a software breakpoint because the code used in processing that breakpoint could itself be kprobe'd and cause a problematic reentry into the debug exception handler. Signed-off-by: William Cohen <wcohen@redhat.com> Signed-off-by: David A. Long <dave.long@linaro.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> [catalin.marinas@arm.com: removed unnecessary masking of the PSTATE bits] Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/kprobes.h')
-rw-r--r--arch/arm64/include/asm/kprobes.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kprobes.h b/arch/arm64/include/asm/kprobes.h
index 79c9511612b5..61b49150dfa3 100644
--- a/arch/arm64/include/asm/kprobes.h
+++ b/arch/arm64/include/asm/kprobes.h
@@ -56,5 +56,7 @@ int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data);
int kprobe_breakpoint_handler(struct pt_regs *regs, unsigned int esr);
int kprobe_single_step_handler(struct pt_regs *regs, unsigned int esr);
+void kretprobe_trampoline(void);
+void __kprobes *trampoline_probe_handler(struct pt_regs *regs);
#endif /* _ARM_KPROBES_H */