[RFC][PATCH 0/2] ftrace/jprobes/x86: Graph trace jprobes if fentry is used
From: Steven Rostedt
Date: Wed Jan 14 2015 - 23:18:24 EST
This is built on top of the patches that disable function graph tracer
for jprobes:
https://lkml.org/lkml/2015/1/14/631
This is actually the first solution I had to deal with jprobes and
function graph tracing, but as I thought the problem only happened
when kprobes used the ftrace infrastructure (fentry), I had a bit
more control of what was happening. But testing showed that the
issue also happens when kprobes does not use fentry, but uses the
breakpoint at the start of the function. Dealing with breakpoints
and simulating commands the breakpoint is on and trying to get
all that to work with function graph tracing was a bit too much,
so I punted (sorry for the American Football reference). I just
made a patch set that disabled function graph tracing on jprobes
all together and I'm pushing that to mainline and stable.
That said, in most cases today, people use x86_64 over i386 and have
newer gcc's that support fentry. That means for the majority of
use cases jprobes can still be traced and we do not need to limit
function graph tracing against them. I took my first solution
and placed it on top of the final solution where if fentry is
supported, we do not disable function graph tracing on jprobes
but instead use the added trampoline tricks to cover it.
The first patch allows for tracing of jprobes and the second patch
lets function graph tracing still trace the function that is being
probed.
Steven Rostedt (Red Hat) (2):
ftrace/jprobes/x86: Allow jprobes to be graph traced if using fentry
ftrace/jprobes/x86: Have function being probed be graph traced
----
arch/x86/include/asm/ftrace.h | 4 +++
arch/x86/include/asm/kprobes.h | 9 +++++
arch/x86/kernel/kprobes/core.c | 72 +++++++++++++++++++++++++++++++++++++++-
arch/x86/kernel/kprobes/ftrace.c | 14 ++++++++
arch/x86/kernel/mcount_64.S | 36 +++++++++++++++++++-
5 files changed, 133 insertions(+), 2 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/