From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by kanga.kvack.org (Postfix) with ESMTP id F0CB39000C4 for ; Tue, 20 Sep 2011 08:16:32 -0400 (EDT) Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by e28smtp02.in.ibm.com (8.14.4/8.13.1) with ESMTP id p8KCGRC4004065 for ; Tue, 20 Sep 2011 17:46:27 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8KCGRun4321318 for ; Tue, 20 Sep 2011 17:46:27 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8KCGQwV016271 for ; Tue, 20 Sep 2011 22:16:27 +1000 From: Srikar Dronamraju Date: Tue, 20 Sep 2011 17:32:55 +0530 Message-Id: <20110920120255.25326.50394.sendpatchset@srdronam.in.ibm.com> In-Reply-To: <20110920115938.25326.93059.sendpatchset@srdronam.in.ibm.com> References: <20110920115938.25326.93059.sendpatchset@srdronam.in.ibm.com> Subject: [PATCH v5 3.1.0-rc4-tip 14/26] uprobe: register exception notifier Sender: owner-linux-mm@kvack.org List-ID: To: Peter Zijlstra , Ingo Molnar Cc: Steven Rostedt , Srikar Dronamraju , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Masami Hiramatsu , Hugh Dickins , Christoph Hellwig , Andi Kleen , Thomas Gleixner , Jonathan Corbet , Oleg Nesterov , Andrew Morton , Jim Keniston , Roland McGrath , Ananth N Mavinakayanahalli , LKML Use the notifier mechanism to register uprobes exception notifier. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Srikar Dronamraju --- kernel/uprobes.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/kernel/uprobes.c b/kernel/uprobes.c index 8b6654e..083c577 100644 --- a/kernel/uprobes.c +++ b/kernel/uprobes.c @@ -30,6 +30,7 @@ #include /* set_pte_at_notify */ #include /* try_to_free_swap */ #include /* user_enable_single_step */ +#include /* notifier mechanism */ #include static struct rb_root uprobes_tree = RB_ROOT; @@ -1209,3 +1210,20 @@ int uprobe_post_notifier(struct pt_regs *regs) set_thread_flag(TIF_UPROBE); return 1; } + +struct notifier_block uprobe_exception_nb = { + .notifier_call = uprobe_exception_notify, + .priority = INT_MAX - 1, /* notified after kprobes, kgdb */ +}; + +static int __init init_uprobes(void) +{ + return register_die_notifier(&uprobe_exception_nb); +} + +static void __exit exit_uprobes(void) +{ +} + +module_init(init_uprobes); +module_exit(exit_uprobes); -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org