[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4AED9FCD.6010202@redhat.com>
Date: Sun, 01 Nov 2009 09:48:45 -0500
From: Masami Hiramatsu <mhiramat@...hat.com>
To: "Frank Ch. Eigler" <fche@...hat.com>
CC: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Li Zefan <lizf@...fujitsu.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
"David S. Miller" <davem@...emloft.net>,
Stephen Hemminger <shemminger@...ux-foundation.org>
Subject: Re: [PATCH 0/3][RFC] tracing/kprobes: prevent jprobes from crashing
function graph tracer
Frank Ch. Eigler wrote:
> Steven Rostedt<rostedt@...dmis.org> writes:
>
>> [...] Jprobes and the function graph tracer use the same mechanism
>> to trace the exit of a function. Unfortunately, only one can be done
>> at a time. The function graph tracer replaces the return address
>> with its own handler, but so does jprobes. The two are not
>> compatible. [...]
>
> What about kretprobes? It too uses the same mechanism.
Exactly, kretprobe uses similar mechanism with func-graph tracer.
Fortunately, it doesn't cause any problem, because kretprobe doesn't
skip any function-return, and func-graph tracer(mcount) always intrudes
a function after kretprobe.
---
call func
<-- kretprobe prehandler changes return address
func()
<-- func-graph prehandler changes return address
...
return
--> func-graph trampoline sets ip to "kretprobe trampoline"
--> kretprobe trampoline sets ip to "real return address"
(return address)
---
So that kretprobe handler doesn't conflict with function graph tracer.
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@...hat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists