lkml.org 
[lkml]   [2019]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/3] x86_64/ftrace: Emulate calls from int3 when patching functions
On Wed, 8 May 2019 13:30:22 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> > To solve this, an int3_emulate_call() is created for x86_64 to allow
> > ftrace on x86_64 to emulate the call to ftrace_regs_caller() which will
> > make sure all the registered handlers to that function are still called.
> > And this keeps live kernel patching happy!
>
> Out of curiosity, would you have any idea to re-use these function for
> other use-case? Maybe kprobes can reuse it, but very limited use-case.

Yes, but only for x86_64.

>
> > To mimimize the changes, and to avoid controversial patches, this
> > only changes x86_64. Due to the way x86_32 implements the regs->sp
> > the complexity of emulating calls on that platform is too much for
> > stable patches, and live kernel patching does not support x86_32 anyway.
>
> This series looks good to me.
>
> Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>

Thanks Masami!

-- Steve

\
 
 \ /
  Last update: 2019-05-08 18:07    [W:0.087 / U:4.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site