From 08c14786d1ae166367c698e94f22ee9cd5da4a4b Mon Sep 17 00:00:00 2001 From: Prasanna S Panchamukhi Date: Thu, 23 Jun 2005 00:09:36 -0700 Subject: [PATCH] --- yaml --- r: 2943 b: refs/heads/master c: ea32c65cc2d2294c04e9f81d0578a6f51febfdbf h: refs/heads/master i: 2941: 63148bdb0f3b5dea6ad4a115648f74ae8f94f7c4 2939: 2494536aa9537660d06864ac04b1e18c2b4d9f25 2935: 11a3b0c589ac53e503b64f69749d8a3f23888ab7 2927: 940c71e3bc7b7a7ff672a5842933f44d20673c10 2911: 8c395b86bb6174e8d2395bd535c779692a48bc69 2879: 5c17fc297a979719ea8ee25b47eb0744c8871cc0 2815: 17249d34c5ac6cfd4db8e93358382ae22ec91cab v: v3 --- [refs] | 2 +- trunk/include/linux/kprobes.h | 9 +++++++++ trunk/kernel/kprobes.c | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d4101a4db12f..3293f592a53c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 89cb14c0dd0e4a7d0315d19f449389c4d49237ee +refs/heads/master: ea32c65cc2d2294c04e9f81d0578a6f51febfdbf diff --git a/trunk/include/linux/kprobes.h b/trunk/include/linux/kprobes.h index 461391decc46..5e1a7b0d7b3f 100644 --- a/trunk/include/linux/kprobes.h +++ b/trunk/include/linux/kprobes.h @@ -36,6 +36,12 @@ #include +/* 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/trunk/kernel/kprobes.c b/trunk/kernel/kprobes.c index dd42e717dd35..456ecedff2d4 100644 --- a/trunk/kernel/kprobes.c +++ b/trunk/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;