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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160324102757.GA29197@lst.de>
Date:	Thu, 24 Mar 2016 11:27:57 +0100
From:	Torsten Duwe <duwe@....de>
To:	Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>
Cc:	Michael Ellerman <mpe@...erman.id.au>,
	Petr Mladek <pmladek@...e.com>, jeyu@...hat.com,
	jkosina@...e.cz, jikos@...nel.org, linux-kernel@...r.kernel.org,
	rostedt@...dmis.org, linuxppc-dev@...abs.org,
	live-patching@...r.kernel.org, mbenes@...e.cz
Subject: Re: [PATCH/RFC] ppc64 livepatch: frameless klp_return_helper using
	odd TOC

On Thu, Mar 24, 2016 at 03:44:55PM +0530, Kamalesh Babulal wrote:
> * Torsten Duwe <duwe@....de> [2016-03-23 16:58:58]:
> 
> > 
> > Since nobody liked the extra stack frame nor its workarounds, here is
> > the next attempt. Assumptions:
> > 
> > 1. Heuristics are bad. The better they are, the more subtly the
> >    way they might fail.
> > 
> > 2. The TOC pointer is usually dividable by 4, if not by 8. An odd
> >    value never occurs.
> > 
> > Conclusively, this patch unambiguously creates an odd TOC value when
> > an ftraced function's global entry point is used. Ftrace_caller will
> > then immediately fix it, and alongside gather the information whether
> > the made call was local or global.
> > 
> > In case of live patching this information is furthermore used to decide
> > whether a klp_return_helper needs to be inserted or not.
> > CAVEAT: any frameless klp_return_helper does not play well with
> > sibling calls! There's an emergency exit that might work, at worst
> > it will cause an oops, but it surely avoids a lockup.
> > At least the live patching modules on ppc64le will need to be compiled
> > using the -fno-optimize-sibling-calls compiler flag!
> > 
> > Thanks go to Michael Matz and Richard Biener for reassurance about
> > heuristics and pointers to the compiler flag.
> > 
> > Signed-off-by: Torsten Duwe <duwe@...e.de>
> 
> Hi Torsten,
> 
> Should this patch be applied over Petr Mladek's v4 ?

Yes. Just omit the changes it makes to entry_64.S and use this instead.

	Torsten

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ