diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2012-09-28 04:15:20 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-01-21 13:22:36 -0500 |
commit | e7dbfe349d12eabb7783b117e0c115f6f3d9ef9e (patch) | |
tree | 8b567abaef12e5bb82171eea70e7f02816958ae9 /include | |
parent | 06aeaaeabf69da4a3e86df532425640f51b01cef (diff) |
kprobes/x86: Move ftrace-based kprobe code into kprobes-ftrace.c
Split ftrace-based kprobes code from kprobes, and introduce
CONFIG_(HAVE_)KPROBES_ON_FTRACE Kconfig flags.
For the cleanup reason, this also moves kprobe_ftrace check
into skip_singlestep.
Link: http://lkml.kernel.org/r/20120928081520.3560.25624.stgit@ltc138.sdl.hitachi.co.jp
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kprobes.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 23755ba42abc..4b6ef4d33cc2 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -49,16 +49,6 @@ | |||
49 | #define KPROBE_REENTER 0x00000004 | 49 | #define KPROBE_REENTER 0x00000004 |
50 | #define KPROBE_HIT_SSDONE 0x00000008 | 50 | #define KPROBE_HIT_SSDONE 0x00000008 |
51 | 51 | ||
52 | /* | ||
53 | * If function tracer is enabled and the arch supports full | ||
54 | * passing of pt_regs to function tracing, then kprobes can | ||
55 | * optimize on top of function tracing. | ||
56 | */ | ||
57 | #if defined(CONFIG_FUNCTION_TRACER) && defined(ARCH_SUPPORTS_FTRACE_SAVE_REGS) \ | ||
58 | && defined(ARCH_SUPPORTS_KPROBES_ON_FTRACE) | ||
59 | # define KPROBES_CAN_USE_FTRACE | ||
60 | #endif | ||
61 | |||
62 | /* Attach to insert probes on any functions which should be ignored*/ | 52 | /* Attach to insert probes on any functions which should be ignored*/ |
63 | #define __kprobes __attribute__((__section__(".kprobes.text"))) | 53 | #define __kprobes __attribute__((__section__(".kprobes.text"))) |
64 | 54 | ||
@@ -316,7 +306,7 @@ extern int proc_kprobes_optimization_handler(struct ctl_table *table, | |||
316 | #endif | 306 | #endif |
317 | 307 | ||
318 | #endif /* CONFIG_OPTPROBES */ | 308 | #endif /* CONFIG_OPTPROBES */ |
319 | #ifdef KPROBES_CAN_USE_FTRACE | 309 | #ifdef CONFIG_KPROBES_ON_FTRACE |
320 | extern void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip, | 310 | extern void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip, |
321 | struct ftrace_ops *ops, struct pt_regs *regs); | 311 | struct ftrace_ops *ops, struct pt_regs *regs); |
322 | extern int arch_prepare_kprobe_ftrace(struct kprobe *p); | 312 | extern int arch_prepare_kprobe_ftrace(struct kprobe *p); |