mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Jessica Yu <jeyu@redhat.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: livepatch/kprobes incompatibility
Date: Thu, 25 Aug 2016 11:08:14 -0500	[thread overview]
Message-ID: <20160825160814.5gawgk4222vusrj5@treble> (raw)
In-Reply-To: <20160824093959.GG4866@pathway.suse.cz>

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@redhat.com

-- 
Josh

  parent reply	other threads:[~2016-08-25 16:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24  1:13 Jessica Yu
2016-08-24  9:39 ` Petr Mladek
2016-08-24 15:23   ` Masami Hiramatsu
2016-08-25 16:08   ` Josh Poimboeuf [this message]
2016-08-24 15:16 ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160825160814.5gawgk4222vusrj5@treble \
    --to=jpoimboe@redhat.com \
    --cc=jeyu@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=pmladek@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®