aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-07-31 16:58:56 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-08-01 09:31:58 -0400
commita5463cd3435475386cbbe7b06e01292ac169d36f (patch)
tree71a32103b6df2be4fac877c60cdda2d9fe46e3a5 /arch/arm/mm
parent48be69a026b2c17350a5ef18a1959a919f60be7d (diff)
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')
-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)
1205 map.pfn = __phys_to_pfn(virt_to_phys(vectors)); 1205 map.pfn = __phys_to_pfn(virt_to_phys(vectors));
1206 map.virtual = 0xffff0000; 1206 map.virtual = 0xffff0000;
1207 map.length = PAGE_SIZE; 1207 map.length = PAGE_SIZE;
1208#ifdef CONFIG_KUSER_HELPERS
1208 map.type = MT_HIGH_VECTORS; 1209 map.type = MT_HIGH_VECTORS;
1210#else
1211 map.type = MT_LOW_VECTORS;
1212#endif
1209 create_mapping(&map); 1213 create_mapping(&map);
1210 1214
1211 if (!vectors_high()) { 1215 if (!vectors_high()) {