mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-30 11:04:25 +00:00
[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>
This commit is contained in:
parent
d98f8f0518
commit
3d5631e063
1 changed files with 8 additions and 0 deletions
|
@ -556,6 +556,11 @@ valid_p:
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct notifier_block kprobe_exceptions_nb = {
|
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,
|
.notifier_call = kprobe_exceptions_notify,
|
||||||
.priority = 0x7fffffff /* we need to notified first */
|
.priority = 0x7fffffff /* we need to notified first */
|
||||||
};
|
};
|
||||||
|
@ -673,6 +678,9 @@ static int __init init_kprobes(void)
|
||||||
if (!err)
|
if (!err)
|
||||||
err = register_die_notifier(&kprobe_exceptions_nb);
|
err = register_die_notifier(&kprobe_exceptions_nb);
|
||||||
|
|
||||||
|
if (!err)
|
||||||
|
err = register_page_fault_notifier(&kprobe_page_fault_nb);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue