lkml.org 
[lkml]   [2012]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 6/9][RFC] kprobes: Allow probe on ftrace reserved text (but move it)
From
Date
On Wed, 2012-05-02 at 16:40 -0400, Frank Ch. Eigler wrote:
> rostedt wrote:
>
> > [...] Added KPROBE_FLAG_MOVED (as suggested by Masami) that is set
> > when the address is moved to get around an ftrace nop. [...]
>
> Steve, perhaps my earlier comments on this got lost during the mailing
> list outage.

I saw it, but it didn't really specify what you wanted. Here's your
comment:


> I suspect Masami intended that this flag is later used during int3
> processing to subtract MCOUNT_INSN_SIZE back out from the pt_regs->ip
> during kprobe_handler() if this flag was set.

This is what I thought too, but to me it sounded like Masami could do
the work. I was just setting up a flag to make it possible.

>
> The gist is that a KPROBE_FLAG_MOVED being set this way accomplishes
> very little since nothing is looking for that flag. Instead, you
> should patch {arch/*}/kernel/kprobe.c kprobe_handler() to subtract
> MCOUNT_INSN_SIZE back out from pt_regs->ip if KPROBE_FLAG_MOVED was
> set. That way, kprobes clients need do not perceive the int3 movement.

I basically thought that Masami wanted me to add the flag, and then
others could look for this and do the adjustment. I'm not the kprobes
author. I was just adding a flag that Masami and others could use to do
such updates.

I'm not sure if the adjustment is fine with everyone, as it may cause
repercussions that I don't know about.

Perhaps that could be another patch (want to write it?)

-- Steve




\
 
 \ /
  Last update: 2012-05-03 02:01    [from the cache]
©2003-2011 Jasper Spaans