From: Anil S Keshavamurthy Kprobes now registers for page fault notifications. Signed-off-by: Anil S Keshavamurthy Signed-off-by: Andrew Morton --- kernel/kprobes.c | 8 ++++++++ 1 files changed, 8 insertions(+) diff -puN kernel/kprobes.c~kprobes-registers-for-notify-page-fault kernel/kprobes.c --- devel/kernel/kprobes.c~kprobes-registers-for-notify-page-fault 2006-04-30 00:30:54.000000000 -0700 +++ devel-akpm/kernel/kprobes.c 2006-04-30 00:30:54.000000000 -0700 @@ -557,6 +557,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; } _