[PATCHv3] arm: ftrace: Adds support for CONFIG_DYNAMIC_FTRACE_WITH_REGS

Steven Rostedt rostedt at goodmis.org
Thu Feb 9 10:14:14 PST 2017


On Thu, 9 Feb 2017 18:06:44 +0000
Russell King - ARM Linux <linux at armlinux.org.uk> wrote:

> On Thu, Feb 09, 2017 at 12:13:22PM -0500, Steven Rostedt wrote:
> > Then came along live kernel patching, which I believe this series is
> > trying to support. What is needed by pt_regs is a way to "hijack" the
> > function being called to instead call the patched function. That is,
> > ftrace is not being used for tracing, but in reality, being used to
> > modify the running kernel. It is being used to change what function
> > gets called. ftrace is just a hook for that mechanism.  
> 
> So, would I be correct to assume that the only parts of pt_regs that
> would be touched are those which contain arguments to the function,
> and the register which would contain the return value?
> 

For live kernel patching, perhaps.

But for kprobes, I think they can touch anything. Matters what the
creater of the kprobe wanted to do.

-- Steve



More information about the linux-arm-kernel mailing list