Re: [(take 2)patch 6/7] Kprobes registers for notify page fault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anil S Keshavamurthy (on Thu, 20 Apr 2006 16:25:02 -0700) wrote:
>---
> kernel/kprobes.c |    8 ++++++++
> 1 file changed, 8 insertions(+)
>
>Index: linux-2.6.17-rc1-mm3/kernel/kprobes.c
>===================================================================
>--- linux-2.6.17-rc1-mm3.orig/kernel/kprobes.c
>+++ linux-2.6.17-rc1-mm3/kernel/kprobes.c
>@@ -544,6 +544,11 @@ static struct notifier_block kprobe_exce
> 	.priority = 0x7fffffff /* we need to notified first */
> };
> 
>+static struct notifier_block kprobe_page_fault_nb = {
>+	.notifier_call = kprobe_exceptions_notify,
>+	.priority = 0x7fffffff /* we need to notified first */
>+};
>+
> int __kprobes register_jprobe(struct jprobe *jp)
> {
> 	/* Todo: Verify probepoint is a function entry point */
>@@ -654,6 +659,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;
> }
> 

The rest of the patches look OK, but this one does not.  init_kprobes()
registers the main kprobe exception handler, not the page fault
handler.

Now that there is a dedicated page fault handler, instead of being a
subcase of notify_die(), it might be better to delete DIE_PAGE_FAULT
completely.  That can be done in this patch set or in some follow on
patches.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux