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: <20120905210534.GI24085@n2100.arm.linux.org.uk>
Date:	Wed, 5 Sep 2012 22:05:34 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	Arnd Bergmann <arnd@...db.de>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	Marc Zyngier <Marc.Zyngier@....com>,
	Will Deacon <Will.Deacon@....com>,
	"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 v2 20/31] arm64: User access library function

On Wed, Sep 05, 2012 at 10:01:37PM +0100, Catalin Marinas wrote:
> There are indeed a few KB gain in code size but that's probably coming
> from the exception table since otherwise you just replace a bl with
> ldrt. It depends on what the compiler does as well, the arm code has
> some carefully chosen registers when calling the __get_user_x function.

It's more than that - it's not just the ldr but also a zeroing of a
temporary register to hold the error code should the instruction fault.
So it's not only the exception tables but also an increase in the
main path - and that's where you benefit from having it out of line and
thereby a hotter i-cache.

> If you do the access_ok inline and the __get_user_x separately, the size
> increase is even greater (at least in the arm64 case it can get to over
> 20KB). I think x86 does the access_ok check out of line.

Please talk to Will about get_user() and put_user().  Afterwards you
will definitely want to keep them out of line on 64-bit ARM.
--
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