]> err.no Git - linux-2.6/commitdiff
[PATCH] Kprobes registers for notify page fault
authorAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Mon, 26 Jun 2006 07:25:28 +0000 (00:25 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 26 Jun 2006 16:58:22 +0000 (09:58 -0700)
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>
kernel/kprobes.c

index f095178e48c3fdf824dcd2e4af65d8337ef3a1c1..507f26e7ae7cff796f8f7e3a40d7f9b78bb9864e 100644 (file)
@@ -556,6 +556,11 @@ valid_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 */
 };
@@ -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;
 }