lkml.org 
[lkml]   [2012]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 00/13 v2] kprobes/ftrace: Making ftrace usable for kprobes
(2012/06/13 7:43), Steven Rostedt wrote:
> If an arch supports passing of ftrace ops, it must also pass regs.
> But it does not need to support passing regs. By default
> an arch can just pass NULL. If it supports regs, then
> it can allow tools like kprobes to ask for regs. Otherwise the
> regs parameter should just be NULL.

Hmm, by default, will the ftrace_ops be also NULL? or NULL only if
the arch doesn't support passing ftrace ops?
I mean, should the generic handler always check if ftrace_ops
isn't NULL before using it?

> The second set is Masami's patches ported on top of these changes.
>
> This is v2, and I've cleaned the patches up a bit and added a lot more
> comments. This is a more serious RFC as this is the current way I plan
> on pushing it to mainline. But I'm posting first in case someone spots
> something that I missed. I'll also be doing more testing on it and if
> someting comes up I'll obviously will fix it before pushing.
>
> Some change since v1:
>
> Added fix for undefined ftrace_location() when compiling with !DYNAMIC_FTRACE.
>
> Added missing regs passed for x86_64 (segment regs, and r11).
>
> Saved flags for when regs are being saved. The cmp in the mcount trampoline
> that checks if function tracing is disabled will save flags before
> the compare, and restore flags before returning back to the function.

Nice! :) this is what I hope in previous thread.

> Decided that passing partial regs is a bad idea. Either the arch should
> pass all regs or NULL. Even though partial regs are saved for calling the
> function, it does't make sense to give that to the callback. By making
> regs be full pt_regs or NULL, then the callbacks can simply check if
> regs is NULL and if it isn't it can do more functionality, but if it
> is NULL then it just does limited work. Having 'partial regs' would just
> complicate that for no good reason. If in the future we want partial regs,
> we can add another flag to request it.

Agreed.

Thank you,

--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com


\
 
 \ /
  Last update: 2012-06-13 11:02    [from the cache]
©2003-2011 Jasper Spaans