summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/mmu.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-07-31 22:58:56 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-08-01 15:31:58 +0200
commita5463cd3435475386cbbe7b06e01292ac169d36f (patch)
tree71a32103b6df2be4fac877c60cdda2d9fe46e3a5 /arch/arm/mm/mmu.c
parentARM: move signal handlers into a vdso-like page (diff)
downloadlinux-a5463cd3435475386cbbe7b06e01292ac169d36f.tar.xz
linux-a5463cd3435475386cbbe7b06e01292ac169d36f.zip
ARM: make vectors page inaccessible from userspace
If kuser helpers are not provided by the kernel, disable user access to the vectors page. With the kuser helpers gone, there is no reason for this page to be visible to userspace. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r--arch/arm/mm/mmu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 9ea274d1af69..ca46f413d867 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1205,7 +1205,11 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
map.pfn = __phys_to_pfn(virt_to_phys(vectors));
map.virtual = 0xffff0000;
map.length = PAGE_SIZE;
+#ifdef CONFIG_KUSER_HELPERS
map.type = MT_HIGH_VECTORS;
+#else
+ map.type = MT_LOW_VECTORS;
+#endif
create_mapping(&map);
if (!vectors_high()) {