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: <1421022180.19708.37.camel@decadent.org.uk>
Date:	Mon, 12 Jan 2015 00:23:00 +0000
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Zefan Li <lizefan@...wei.com>, Jiri Slaby <jslaby@...e.cz>
Cc:	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	kernel-team@...ts.ubuntu.com,
	Steve Capper <steve.capper@...aro.org>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Hou Pengyang <houpengyang@...wei.com>,
	Luis Henriques <luis.henriques@...onical.com>
Subject: [stable] ARM: 8108/1: mm: Introduce {pte,pmd}_isset and
 {pte,pmd}_isclear

On Mon, 2014-12-15 at 14:25 +0000, Luis Henriques wrote:
> 3.16.7-ckt3 -stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Steven Capper <steve.capper@...aro.org>
> 
> commit f2950706871c4b6e8c0f0d7c3f62d35930b8de63 upstream.
> 
> Long descriptors on ARM are 64 bits, and some pte functions such as
> pte_dirty return a bitwise-and of a flag with the pte value. If the
> flag to be tested resides in the upper 32 bits of the pte, then we run
> into the danger of the result being dropped if downcast.
> 
> For example:
> 	gather_stats(page, md, pte_dirty(*pte), 1);
> where pte_dirty(*pte) is downcast to an int.
> 
> This patch introduces a new macro pte_isset which performs the bitwise
> and, then performs a double logical invert (where needed) to ensure
> predictable downcasting. The logical inverse pte_isclear is also
> introduced.
> 
> Equivalent pmd functions for Transparent HugePages have also been
> added.
> 
> Signed-off-by: Steve Capper <steve.capper@...aro.org>
> Reviewed-by: Will Deacon <will.deacon@....com>
> Signed-off-by: Russell King <rmk+kernel@....linux.org.uk>
> Cc: Hou Pengyang <houpengyang@...wei.com>
> Signed-off-by: Luis Henriques <luis.henriques@...onical.com>
[...]

This has only been applied to 3.16 so far, but it appears to be suitable
for every branch from 3.4 onwards as ARM LPAE was introduced in 3.3.

Ben.

-- 
Ben Hutchings
The world is coming to an end.	Please log off.

Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ