This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip v4 6/6] [RFC] kprobes/x86: Call exception handlers directly from do_int3/do_debug
- From: Steven Rostedt <rostedt at goodmis dot org>
- To: Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>
- Cc: Ingo Molnar <mingo at kernel dot org>, Andi Kleen <ak at linux dot intel dot com>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Sandeepa Prabhu <sandeepa dot prabhu at linaro dot org>, Frederic Weisbecker <fweisbec at gmail dot com>, x86 at kernel dot org, lkml <linux-kernel at vger dot kernel dot org>, Andrew Morton <akpm at linux-foundation dot org>, Ingo Molnar <mingo at redhat dot com>, systemtap at sourceware dot org, "H. Peter Anvin" <hpa at zytor dot com>, Sasha Levin <sasha dot levin at oracle dot com>, Thomas Gleixner <tglx at linutronix dot de>, Seiji Aguchi <seiji dot aguchi at hds dot com>, "David S. Miller" <davem at davemloft dot net>
- Date: Tue, 3 Dec 2013 21:39:04 -0500
- Subject: Re: [PATCH -tip v4 6/6] [RFC] kprobes/x86: Call exception handlers directly from do_int3/do_debug
- Authentication-results: sourceware.org; auth=none
- References: <20131204012841 dot 22118 dot 82992 dot stgit at kbuild-fedora dot novalocal> <20131204012856 dot 22118 dot 91079 dot stgit at kbuild-fedora dot novalocal>
On Wed, 04 Dec 2013 01:28:56 +0000
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> 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