Skip to content

Commit

Permalink
[PATCH] Kprobes registers for notify page fault
Browse files Browse the repository at this point in the history
Kprobes now registers for page fault notifications.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavmurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Anil S Keshavamurthy authored and Linus Torvalds committed Jun 26, 2006
1 parent d98f8f0 commit 3d5631e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,11 @@ void __kprobes unregister_kprobe(struct kprobe *p)
}

static struct notifier_block kprobe_exceptions_nb = {
.notifier_call = kprobe_exceptions_notify,
.priority = 0x7fffffff /* we need to be notified first */
};

static struct notifier_block kprobe_page_fault_nb = {
.notifier_call = kprobe_exceptions_notify,
.priority = 0x7fffffff /* we need to notified first */
};
Expand Down Expand Up @@ -673,6 +678,9 @@ static int __init init_kprobes(void)
if (!err)
err = register_die_notifier(&kprobe_exceptions_nb);

if (!err)
err = register_page_fault_notifier(&kprobe_page_fault_nb);

return err;
}

Expand Down

0 comments on commit 3d5631e

Please sign in to comment.