lkml.org 
[lkml]   [2015]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 0/3] kprobes/ftrace/x86: Function graph trace jprobes
On Thu, 29 Jan 2015 15:04:44 +0900
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:

> Hmm, could you make this more generic? Maybe we can directly call
> ftrace_return_to_handler() from longjmp_break_handler().

I tried that, but because the longjump handlers can also be traced (and
I still want them to be :-) It makes things even more complicated to
get the stacks right. It's best to deal with the stack when you can.

> Actually, current implementation seems just skipping one return
> address, however, there may be possible to call jprobe_return() in
> the nested functions, like below;
>
> void test_exit(int flag)
> {
> if (!flag)
> jprobe_return();
> }
> int jdo_fork(...)
> {
> ...
> test_exit(something_to_test);
> ...
> jprobe_return();
> return 0;
> }
>
> I've tested similar code on this series and it crashed kernel.
> (I also checked that the above example can work safely without graph tracer)
>

Ah yes, I missed this. I have a way to solve this but it's not going to
get done before the merge window. Thanks for the test case. I'll use
this and more complicated ones for future changes.

Thanks!

-- Steve



\
 
 \ /
  Last update: 2015-01-29 15:01    [W:0.051 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site