Re: [RFC][PATCH] x86: ptrace: Add function argument access API
From: Steven Rostedt
Date: Thu Oct 11 2018 - 23:01:58 EST
On Thu, 11 Oct 2018 23:00:21 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> A while ago I posted an RFC patchset for dynamic function based
> events. But Masami pointed out that this could be done with kprobes
> with minimal changes. He posted a patch set back in March
> http://lkml.kernel.org/r/152049860385.7289.14079393589900496424.stgit@devbox
> I've pulled this in locally, but haven't had the time until recently
> to look at it seriously. I even plan to talk about these changes in
> my talk at Open Source Summit in Edinburgh less than two weeks away
> (talk about conference driven development!).
> Anyway, the one patch that really needs external approval is the one
> that creates a new architecture dependent API to retrieve function
> arguments from pt_regs if the ip is at the start of the function call
> (via a breakpoint or ftrace fentry). That's this patch.
>
> Anyone have any issues with it? If not, I'm going to start doing some
> serious testing of this code and try to get it into the next merge
> window.
You can also play with the full repo here:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
branch: ftrace/kprobes
-- Steve