lkml.org 
[lkml]   [2008]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3][RFC] ftrace: track dynamic ftrace update failures
On Tue, Jun 3, 2008 at 6:30 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> Can we add an API to kprobes or perhaps a way to register code
> modification in ftrace, that ftrace can ignore? Let the two know about
> each other, but in a way that they dont need to know the internals of one
> another.

There's a get_kprobe() already which can tell if an address's kprobed
or not. But still doesn't stop kprobe from forcing change on mcount
sites and fooling ftrace like mentioned previously. The
problem with maintaining a blacklist sort of thing for kprobed mcount
sites may also be an
overkill since it can permanently make that function un-ftraceable.

One kprobe specific measure can be to provide notifiers in
[un]register_kprobe(). Ftrace can
listen on register event to temporarily disable tracing of the
corresponding function by forcing
a NOP at the mcount site just before a kprobe is placed on it, if it's
already recorded/enabled.
The tracing can be enabled back when the corresponding unregister
event is received. Worth a
shot?

--
Regards,
Abhishek Sagar


\
 
 \ /
  Last update: 2008-06-03 17:29    [W:0.099 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site