diff options
-rw-r--r-- | include/linux/kprobes.h | 9 | ||||
-rw-r--r-- | kernel/kprobes.c | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 461391decc46..5e1a7b0d7b3f 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -36,6 +36,12 @@ | |||
36 | 36 | ||
37 | #include <asm/kprobes.h> | 37 | #include <asm/kprobes.h> |
38 | 38 | ||
39 | /* kprobe_status settings */ | ||
40 | #define KPROBE_HIT_ACTIVE 0x00000001 | ||
41 | #define KPROBE_HIT_SS 0x00000002 | ||
42 | #define KPROBE_REENTER 0x00000004 | ||
43 | #define KPROBE_HIT_SSDONE 0x00000008 | ||
44 | |||
39 | struct kprobe; | 45 | struct kprobe; |
40 | struct pt_regs; | 46 | struct pt_regs; |
41 | struct kretprobe; | 47 | struct kretprobe; |
@@ -55,6 +61,9 @@ struct kprobe { | |||
55 | /* list of kprobes for multi-handler support */ | 61 | /* list of kprobes for multi-handler support */ |
56 | struct list_head list; | 62 | struct list_head list; |
57 | 63 | ||
64 | /*count the number of times this probe was temporarily disarmed */ | ||
65 | unsigned long nmissed; | ||
66 | |||
58 | /* location of the probe point */ | 67 | /* location of the probe point */ |
59 | kprobe_opcode_t *addr; | 68 | kprobe_opcode_t *addr; |
60 | 69 | ||
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index dd42e717dd35..456ecedff2d4 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -335,6 +335,7 @@ int register_kprobe(struct kprobe *p) | |||
335 | } | 335 | } |
336 | spin_lock_irqsave(&kprobe_lock, flags); | 336 | spin_lock_irqsave(&kprobe_lock, flags); |
337 | old_p = get_kprobe(p->addr); | 337 | old_p = get_kprobe(p->addr); |
338 | p->nmissed = 0; | ||
338 | if (old_p) { | 339 | if (old_p) { |
339 | ret = register_aggr_kprobe(old_p, p); | 340 | ret = register_aggr_kprobe(old_p, p); |
340 | goto out; | 341 | goto out; |