diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-29 06:00:59 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-14 04:34:22 -0400 |
commit | 36dcd67ae994fece615b7c700958d215e884b9ae (patch) | |
tree | 2a4bed0cb9de673b7760b81f9fe03fd5f262c77e | |
parent | 9795302acf2817d0842e56d23df6008e43df0970 (diff) |
ftrace: ignore functions that cannot be kprobe-ed
kprobes already has an extensive list of annotations for functions
that should not be instrumented. Add notrace annotations to these
functions as well.
This is particularly useful for functions called by the NMI path.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/linux/kprobes.h | 5 | ||||
-rw-r--r-- | kernel/notifier.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 0be7795655fa..497b1d1f7a05 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -29,6 +29,7 @@ | |||
29 | * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi | 29 | * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi |
30 | * <prasanna@in.ibm.com> added function-return probes. | 30 | * <prasanna@in.ibm.com> added function-return probes. |
31 | */ | 31 | */ |
32 | #include <linux/linkage.h> | ||
32 | #include <linux/list.h> | 33 | #include <linux/list.h> |
33 | #include <linux/notifier.h> | 34 | #include <linux/notifier.h> |
34 | #include <linux/smp.h> | 35 | #include <linux/smp.h> |
@@ -47,7 +48,7 @@ | |||
47 | #define KPROBE_HIT_SSDONE 0x00000008 | 48 | #define KPROBE_HIT_SSDONE 0x00000008 |
48 | 49 | ||
49 | /* Attach to insert probes on any functions which should be ignored*/ | 50 | /* Attach to insert probes on any functions which should be ignored*/ |
50 | #define __kprobes __attribute__((__section__(".kprobes.text"))) | 51 | #define __kprobes __attribute__((__section__(".kprobes.text"))) notrace |
51 | 52 | ||
52 | struct kprobe; | 53 | struct kprobe; |
53 | struct pt_regs; | 54 | struct pt_regs; |
@@ -256,7 +257,7 @@ void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head); | |||
256 | 257 | ||
257 | #else /* CONFIG_KPROBES */ | 258 | #else /* CONFIG_KPROBES */ |
258 | 259 | ||
259 | #define __kprobes /**/ | 260 | #define __kprobes notrace |
260 | struct jprobe; | 261 | struct jprobe; |
261 | struct kretprobe; | 262 | struct kretprobe; |
262 | 263 | ||
diff --git a/kernel/notifier.c b/kernel/notifier.c index 823be11584ef..4282c0a40a57 100644 --- a/kernel/notifier.c +++ b/kernel/notifier.c | |||
@@ -550,7 +550,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier); | |||
550 | 550 | ||
551 | static ATOMIC_NOTIFIER_HEAD(die_chain); | 551 | static ATOMIC_NOTIFIER_HEAD(die_chain); |
552 | 552 | ||
553 | int notify_die(enum die_val val, const char *str, | 553 | int notrace notify_die(enum die_val val, const char *str, |
554 | struct pt_regs *regs, long err, int trap, int sig) | 554 | struct pt_regs *regs, long err, int trap, int sig) |
555 | { | 555 | { |
556 | struct die_args args = { | 556 | struct die_args args = { |