summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/kprobes.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2020-09-02 16:25:53 +0300
committerThomas Gleixner <tglx@linutronix.de>2020-09-04 16:12:52 +0300
commit20a6e35a948284b8ab246ed35eefc56d674ad076 (patch)
tree51c21cd3cccd525a8c8d26e45d3b7572675a3cdf /arch/x86/include/asm/kprobes.h
parentc182487da1b5281463f2255d2347885dba219c08 (diff)
downloadlinux-20a6e35a948284b8ab246ed35eefc56d674ad076.tar.xz
x86/debug: Move kprobe_debug_handler() into exc_debug_kernel()
Kprobes are on kernel text, and thus only matter for #DB-from-kernel. Kprobes are ordered before the generic notifier, preserve that order. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Daniel Thompson <daniel.thompson@linaro.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Acked-by: Andy Lutomirski <luto@kernel.org> Link: https://lore.kernel.org/r/20200902133200.847465360@infradead.org
Diffstat (limited to 'arch/x86/include/asm/kprobes.h')
-rw-r--r--arch/x86/include/asm/kprobes.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h
index 143bc9abe99c..991a7ad540c7 100644
--- a/arch/x86/include/asm/kprobes.h
+++ b/arch/x86/include/asm/kprobes.h
@@ -106,5 +106,9 @@ extern int kprobe_exceptions_notify(struct notifier_block *self,
extern int kprobe_int3_handler(struct pt_regs *regs);
extern int kprobe_debug_handler(struct pt_regs *regs);
+#else
+
+static inline int kprobe_debug_handler(struct pt_regs *regs) { return 0; }
+
#endif /* CONFIG_KPROBES */
#endif /* _ASM_X86_KPROBES_H */