summaryrefslogtreecommitdiffstats
path: root/kernel/kprobes.c
diff options
context:
space:
mode:
authorAnil S Keshavamurthy2006-06-26 09:25:28 +0200
committerLinus Torvalds2006-06-26 18:58:22 +0200
commit3d5631e0631a11633c649bc995a6537ec21b67b4 (patch)
tree84924f8c647c2d67b9a1113408efd24e48dabf66 /kernel/kprobes.c
parent[PATCH] Notify page fault call chain for sparc64 (diff)
downloadkernel-qcow2-linux-3d5631e0631a11633c649bc995a6537ec21b67b4.tar.gz
kernel-qcow2-linux-3d5631e0631a11633c649bc995a6537ec21b67b4.tar.xz
kernel-qcow2-linux-3d5631e0631a11633c649bc995a6537ec21b67b4.zip
[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>
Diffstat (limited to 'kernel/kprobes.c')
-rw-r--r--kernel/kprobes.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index f095178e48c3..507f26e7ae7c 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -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;
}