lkml.org 
[lkml]   [2017]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Revert "kprobes: Warn if optprobe handler tries to change execution path"
On 2017/10/19 09:38PM, Masami Hiramatsu wrote:
> On Tue, 17 Oct 2017 13:48:34 +0530
> "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:
>
> > This reverts commit e863d539614641 ("kprobes: Warn if optprobe handler
> > tries to change execution path").
> >
> > On powerpc, we place a probe at kretprobe_trampoline to catch function
> > returns and with CONFIG_OPTPROBES, this probe gets optimized. This
> > works for us due to the way we handle the optprobe as described in
> > commit 762df10bad6954 ("powerpc/kprobes: Optimize kprobe
> > in kretprobe_trampoline()"). With the above commit, we end up with a
> > warning. As such, revert this change.
>
> OK, so for ppc, optprobe can handle nip change.
>
> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
>
> I'll update the document too.

Thanks. We don't quite handle the nip change (yet), but just work around
it for kretprobe trampoline by using the link register, and issuing a
'blr' after the trampoline code.

Regards,
Naveen

\
 
 \ /
  Last update: 2017-10-23 15:59    [W:0.058 / U:1.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site