linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Torsten Duwe <duwe@lst.de>
To: Jiri Kosina <jikos@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Petr Mladek <pmladek@suse.com>,
	Denis Kirjanov <kda@linux-powerpc.org>,
	linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	live-patching@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)
Date: Thu, 21 Jan 2016 22:56:38 +0100	[thread overview]
Message-ID: <20160121215638.GA5033@lst.de> (raw)
In-Reply-To: <alpine.LNX.2.00.1601212227200.21446@cbobk.fhfr.pm>

On Thu, Jan 21, 2016 at 10:29:13PM +0100, Jiri Kosina wrote:
> On Thu, 21 Jan 2016, Torsten Duwe wrote:
> 
> > > mcount call sites looks normal on first sight...
> > 
> > Not quite.
> > LR is not saved on the stack before the call.
> > Argh!
> > 
> > Petr, this looks like 12 bytes offset for gcc-6.
> > I think I can work around the rest.
> 
> Are we sure that gcc is doing the right thing here?
> 
> I am far from claiming understanding of ppc64 ABI, but from what Vojtech 
> told me I understood that saving link register is necessary for (at least) 
> graph tracer to work properly.

It is held in R0 only, and saved right after _mcount. Thus, _mcount just
must not clobber R0 or save it the same way as it's done afterwards or
like gcc4 does it.

I'll make a v6 that's compiler agnostic. It's a few lines to change
for the kernel proper, and I'll have to have a look at the trampolines
for modules.

	Torsten

      reply	other threads:[~2016-01-21 21:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 14:45 [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2) Torsten Duwe
2015-12-04 13:36 ` [PATCH v5 1/9] ppc64 (le): prepare for -mprofile-kernel Torsten Duwe
2015-12-04 13:38 ` [PATCH v5 2/9] ppc64le FTRACE_WITH_REGS implementation Torsten Duwe
2015-12-04 13:39 ` [PATCH v5 3/9] ppc use ftrace_modify_all_code default Torsten Duwe
2015-12-04 13:50 ` [PATCH v5 4/9] ppc64 ftrace_with_regs configuration variables Torsten Duwe
2015-12-04 13:52 ` [PATCH v5 5/9] ppc64 ftrace_with_regs: spare early boot and low level Torsten Duwe
2015-12-04 13:55 ` [PATCH v5 6/9] ppc64 ftrace: disable profiling for some functions Torsten Duwe
2015-12-04 13:57 ` [PATCH v5 7/9] ppc64 ftrace: disable profiling for some files Torsten Duwe
2015-12-04 14:11 ` [PATCH v5 8/9] Implement kernel live patching for ppc64le (ABIv2) Torsten Duwe
2015-12-04 14:13 ` [PATCH v5 9/9] Enable LIVEPATCH to be configured on ppc64le and add livepatch.o if it is selected Torsten Duwe
2016-01-06 14:23   ` Petr Mladek
2016-01-06 14:17 ` [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2) Petr Mladek
2016-01-20  6:03   ` Michael Ellerman
2016-01-20  9:07     ` Torsten Duwe
2016-01-20  9:48     ` Petr Mladek
2016-01-21 11:34       ` Petr Mladek
2016-01-21  9:33     ` Jiri Kosina
2016-01-21 12:54       ` Michael Ellerman
2016-01-21 15:06         ` Torsten Duwe
2016-01-21 15:12           ` Torsten Duwe
2016-01-21 21:29             ` Jiri Kosina
2016-01-21 21:56               ` Torsten Duwe [this message]

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=20160121215638.GA5033@lst.de \
    --to=duwe@lst.de \
    --cc=jikos@kernel.org \
    --cc=kda@linux-powerpc.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).