From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12504 invoked by alias); 4 Dec 2013 02:39:16 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 12491 invoked by uid 89); 4 Dec 2013 02:39:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: cdptpa-oedge-vip.email.rr.com Received: from Unknown (HELO cdptpa-oedge-vip.email.rr.com) (107.14.166.225) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Dec 2013 02:39:14 +0000 Received: from [67.255.60.225] ([67.255.60.225:50342] helo=gandalf.local.home) by cdptpa-oedge02 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 17/EB-06343-9C59E925; Wed, 04 Dec 2013 02:39:06 +0000 Date: Wed, 04 Dec 2013 02:39:00 -0000 From: Steven Rostedt To: Masami Hiramatsu Cc: Ingo Molnar , Andi Kleen , Ananth N Mavinakayanahalli , Sandeepa Prabhu , Frederic Weisbecker , x86@kernel.org, lkml , Andrew Morton , Ingo Molnar , systemtap@sourceware.org, "H. Peter Anvin" , Sasha Levin , Thomas Gleixner , Seiji Aguchi , "David S. Miller" Subject: Re: [PATCH -tip v4 6/6] [RFC] kprobes/x86: Call exception handlers directly from do_int3/do_debug Message-ID: <20131203213904.5ff1794c@gandalf.local.home> In-Reply-To: <20131204012856.22118.91079.stgit@kbuild-fedora.novalocal> References: <20131204012841.22118.82992.stgit@kbuild-fedora.novalocal> <20131204012856.22118.91079.stgit@kbuild-fedora.novalocal> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.130:25 X-SW-Source: 2013-q4/txt/msg00322.txt.bz2 On Wed, 04 Dec 2013 01:28:56 +0000 Masami Hiramatsu wrote: > To avoid a kernel crash by probing on lockdep code, call > kprobe_int3_handler and kprobe_debug_handler directly > from do_int3 and do_debug. Since there is a locking code > in notify_die, lockdep code can be invoked. And because > the lockdep involves printk() related things, theoretically, > we need to prohibit probing on much more code... > > Anyway, most of the int3 handlers in the kernel are already > called from do_int3 directly, e.g. ftrace_int3_handler, > poke_int3_handler, kgdb_ll_trap. Actually only > kprobe_exceptions_notify is on the notifier_call_chain. > > So I think this is not a crazy thing. What? Oh, yeah. No, using notifiers in int3 handler is the crazy thing ;-) Hmm, if there's no users of the int3 notifier, should we just remove it? -- Steve