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: <20140523161219.GK21319@arm.com>
Date:	Fri, 23 May 2014 17:12:19 +0100
From:	Will Deacon <will.deacon@....com>
To:	Mark Rutland <mark.rutland@....com>
Cc:	Catalin Marinas <Catalin.Marinas@....com>,
	Kevin Hilman <khilman@...aro.org>,
	Christopher Covington <cov@...eaurora.org>,
	Larry Bassel <larry.bassel@...aro.org>,
	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v4 2/2] arm64: enable context tracking

On Fri, May 23, 2014 at 04:55:44PM +0100, Mark Rutland wrote:
> On Fri, May 23, 2014 at 03:51:07PM +0100, Catalin Marinas wrote:
> > On Fri, May 23, 2014 at 01:11:38AM +0100, Kevin Hilman wrote:
> > I haven't checked all the code paths but at least for pushing onto the
> > stack we must keep it 16-bytes aligned (architecture requirement).
> 
> Sure -- if modifying the stack we need to push/pop pairs of registers to
> keep it aligned. It might be better to use xzr as the dummy value in
> that case to make it clear that the value doesn't really matter.
> 
> That said, ct_user_enter is only called in kernel_exit before we restore
> the values off the stack, and the only register I can spot that we need
> to preserve is x0 for the syscall return value. I can't see x1 or x2
> being used any more specially than the rest of the remaining registers.
> Am I missing something, or would it be sufficient to do the following?
> 
> push	x0, xzr
> bl	context_tacking_user_enter
> pop	x0, xzr

... and if that works, then why are we using the stack instead of a
callee-saved register?

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ