Re: livepatch/kprobes incompatibility

From: Josh Poimboeuf
Date: Thu Aug 25 2016 - 12:09:09 EST


On Wed, Aug 24, 2016 at 11:39:59AM +0200, Petr Mladek wrote:
> + kretprobe is safe as well; the kprobe handler does not modify regs->ip;
> it just modifies the return address from the function; it does not affect
> livepatching because the address is defined by the function caller
> and livepatching keeps it as is

BTW, I think there's still a kretprobe issue which affects the accuracy
of the unwinder and the consistency model. The unwinder will report
kretprobe_trampoline instead of the real caller's return address.

It can probably be fixed similarly to how ftrace function_graph tracing
does it with a ftrace_graph_ret_addr() helper:

https://lkml.kernel.org/r/cover.1471607358.git.jpoimboe@xxxxxxxxxx

--
Josh