All of lore.kernel.org
 help / color / mirror / Atom feed
From: Torsten Duwe <duwe@lst.de>
To: Petr Mladek <pmladek@suse.com>
Cc: jeyu@redhat.com, jkosina@suse.cz, jikos@kernel.org,
	linux-kernel@vger.kernel.org, rostedt@goodmis.org,
	kamalesh@linux.vnet.ibm.com, linuxppc-dev@ozlabs.org,
	live-patching@vger.kernel.org, mbenes@suse.cz
Subject: Re: [PATCH 2/2] ppc64le live patch: get rid of mini stack frame
Date: Thu, 10 Mar 2016 14:04:53 +0100	[thread overview]
Message-ID: <20160310130453.GA3983@lst.de> (raw)
In-Reply-To: <20160310125116.GS10940@pathway.suse.cz>

On Thu, Mar 10, 2016 at 01:51:16PM +0100, Petr Mladek wrote:
> On Thu 2016-03-10 13:25:08, Petr Mladek wrote:
> > On Wed 2016-03-09 18:30:17, Torsten Duwe wrote:
> > > After the mini stack frame is no longer required for TOC storage, it can
> > > be eliminated iff the functionality of klp_return_helper, which required
> > > a stack frame for the extra return address previously, is carried out
> > > by the replacement function now. This requires _every_ live patch replacement
> > > function to execute the following (or similar) sequence of machine instructions
> > > just before every return to the original caller:
> > 
> > I have thought about it and it is a nono from my point of view.
> > It is too error prone, especially that there are functions that
> > call return on several locations.

Yes, that's what I think as well when I look at it.

> BTW: How is this solved in kretprobes? Or is it easier there?

Without any look at the code I assume it uses solution 3. Once
you have a probing framework in place, you can remember the real
return addresses in a data structure. As I wrote, the function
graph tracer does it this way so it would be abvious.

	Torsten

  parent reply	other threads:[~2016-03-10 13:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 17:28 [PATCH 1/2] ppc64le live patch: clear out storage location(s) in mini stack frame Torsten Duwe
2016-03-09 17:30 ` [PATCH 2/2] ppc64le live patch: get rid of " Torsten Duwe
2016-03-10 12:25   ` Petr Mladek
2016-03-10 12:51     ` Petr Mladek
2016-03-10 12:58       ` Jiri Kosina
2016-03-10 13:04       ` Torsten Duwe [this message]
2016-03-11  0:50         ` Michael Ellerman
2016-03-11  3:37 ` [PATCH 1/2] ppc64le live patch: clear out storage location(s) in " Balbir Singh

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=20160310130453.GA3983@lst.de \
    --to=duwe@lst.de \
    --cc=jeyu@redhat.com \
    --cc=jikos@kernel.org \
    --cc=jkosina@suse.cz \
    --cc=kamalesh@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.