[PATCH] Kprobes registers for notify page fault
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>
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index f095178..507f26e 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -557,6 +557,11 @@
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 */
};
@@ -673,6 +678,9 @@
if (!err)
err = register_die_notifier(&kprobe_exceptions_nb);
+ if (!err)
+ err = register_page_fault_notifier(&kprobe_page_fault_nb);
+
return err;
}