lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 21 Jan 2016 22:56:38 +0100
From:	Torsten Duwe <duwe@....de>
To:	Jiri Kosina <jikos@...nel.org>
Cc:	Michael Ellerman <mpe@...erman.id.au>,
	Petr Mladek <pmladek@...e.com>,
	Denis Kirjanov <kda@...ux-powerpc.org>,
	linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
	live-patching@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v5 0/9] ftrace with regs + live patching for ppc64 LE
	(ABI v2)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ