This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip v5 00/10] kprobes: Kprobes jump optimization support
- From: Frederic Weisbecker <fweisbec at gmail dot com>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Ingo Molnar <mingo at elte dot hu>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, lkml <linux-kernel at vger dot kernel dot org>, "H. Peter Anvin" <hpa at zytor dot com>, Jim Keniston <jkenisto at us dot ibm dot com>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Christoph Hellwig <hch at infradead dot org>, Steven Rostedt <rostedt at goodmis dot org>, Anders Kaseorg <andersk at ksplice dot com>, Tim Abbott <tabbott at ksplice dot com>, Andi Kleen <andi at firstfloor dot org>, Jason Baron <jbaron at redhat dot com>, Mathieu Desnoyers <mathieu dot desnoyers at polymtl dot ca>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>
- Date: Tue, 24 Nov 2009 04:20:09 +0100
- Subject: Re: [PATCH -tip v5 00/10] kprobes: Kprobes jump optimization support
- References: <20091123232115.22071.71558.stgit@dhcp-100-2-132.bos.redhat.com> <20091124020315.GA6221@nowhere>
On Tue, Nov 24, 2009 at 03:03:19AM +0100, Frederic Weisbecker wrote:
> On Mon, Nov 23, 2009 at 06:21:16PM -0500, Masami Hiramatsu wrote:
> > When the optimized-kprobe is hit before optimization, its handler
> > changes IP(instruction pointer) to copied code and exits. So, the
> > instructions which were copied to detour buffer are executed on the detour
> > buffer.
>
>
>
> Hm, why is it playing such hybrid game there?
> If I understand well, we have executed int 3, executed the
> handler and we jump back to the detour buffer?
>
I got it, I think. We have instructions to patch. And the above
turn this area into dead code, safe to patch.
But still, stop_machine() seem to make it not necessary anymore.