summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/kprobes.h9
-rw-r--r--kernel/kprobes.c1
2 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 461391decc4..5e1a7b0d7b3 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -36,6 +36,12 @@
#include <asm/kprobes.h>
+/* kprobe_status settings */
+#define KPROBE_HIT_ACTIVE 0x00000001
+#define KPROBE_HIT_SS 0x00000002
+#define KPROBE_REENTER 0x00000004
+#define KPROBE_HIT_SSDONE 0x00000008
+
struct kprobe;
struct pt_regs;
struct kretprobe;
@@ -55,6 +61,9 @@ struct kprobe {
/* list of kprobes for multi-handler support */
struct list_head list;
+ /*count the number of times this probe was temporarily disarmed */
+ unsigned long nmissed;
+
/* location of the probe point */
kprobe_opcode_t *addr;
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index dd42e717dd3..456ecedff2d 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -335,6 +335,7 @@ int register_kprobe(struct kprobe *p)
}
spin_lock_irqsave(&kprobe_lock, flags);
old_p = get_kprobe(p->addr);
+ p->nmissed = 0;
if (old_p) {
ret = register_aggr_kprobe(old_p, p);
goto out;