]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ARM: mm: use pteval_t to represent page protection values
authorWill Deacon <will.deacon@arm.com>
Tue, 18 Sep 2012 18:18:35 +0000 (19:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2013 17:03:48 +0000 (09:03 -0800)
commitf61019b8f7253ee77cebe22e9ff58865d16378a7
treed22ff60bd98c1c970393e2f273fb42059192c21a
parent8d15569e14cfcf9151e9e3b4c0cb98369943a2bb
ARM: mm: use pteval_t to represent page protection values

commit 864aa04cd02979c2c755cb28b5f4fe56039171c0 upstream.

When updating the page protection map after calculating the user_pgprot
value, the base protection map is temporarily stored in an unsigned long
type, causing truncation of the protection bits when LPAE is enabled.
This effectively means that calls to mprotect() will corrupt the upper
page attributes, clearing the XN bit unconditionally.

This patch uses pteval_t to store the intermediate protection values,
preserving the upper bits for 64-bit descriptors.

Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/mm/mmu.c