Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314560

Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

From Torsten Duwe <duwe@lst.de>
Newsgroups linux.kernel
Subject Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)
Date 2016-01-21 23:00 +0100
Message-ID <qTvqP-2KT-17@gated-at.bofh.it> (permalink)
References (3 earlier) <qTjSG-3ll-13@gated-at.bofh.it> <qTn0d-5nD-13@gated-at.bofh.it> <qTp22-6YC-17@gated-at.bofh.it> <qTpbH-72a-13@gated-at.bofh.it> <qTuXN-2zU-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Michael Ellerman <mpe@ellerman.id.au> - 2016-01-20 07:10 +0100
  Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Torsten Duwe <duwe@lst.de> - 2016-01-20 10:10 +0100
  Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Petr Mladek <pmladek@suse.com> - 2016-01-20 10:50 +0100
    Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Petr Mladek <pmladek@suse.com> - 2016-01-21 12:40 +0100
  Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Jiri Kosina <jikos@kernel.org> - 2016-01-21 10:40 +0100
    Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Michael Ellerman <mpe@ellerman.id.au> - 2016-01-21 14:00 +0100
      Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Torsten Duwe <duwe@lst.de> - 2016-01-21 16:10 +0100
        Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Torsten Duwe <duwe@lst.de> - 2016-01-21 16:20 +0100
          Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Jiri Kosina <jikos@kernel.org> - 2016-01-21 22:30 +0100
            Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE  (ABI v2) Torsten Duwe <duwe@lst.de> - 2016-01-21 23:00 +0100

csiph-web