diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-08-01 20:51:13 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-08-01 20:51:13 +0100 |
commit | 24195cad3e00557da166d629c8b0fd2f984f2170 (patch) | |
tree | df4353bd5f7d213310e8d4eef812b7c0c2ed4331 /arch/arm/mm/mmu.c | |
parent | 2449189bb7c73b5fe55a18bc0d289e39bdcd4998 (diff) | |
parent | a5463cd3435475386cbbe7b06e01292ac169d36f (diff) | |
download | linux-24195cad3e00557da166d629c8b0fd2f984f2170.tar.bz2 |
Merge branch 'security-fixes' into fixes
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r-- | arch/arm/mm/mmu.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index b3fdb63783e3..53cdbd39ec8e 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1195,7 +1195,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc) /* * Allocate the vector page early. */ - vectors = early_alloc(PAGE_SIZE); + vectors = early_alloc(PAGE_SIZE * 2); early_trap_init(vectors); @@ -1240,15 +1240,27 @@ 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()) { map.virtual = 0; + map.length = PAGE_SIZE * 2; map.type = MT_LOW_VECTORS; create_mapping(&map); } + /* Now create a kernel read-only mapping */ + map.pfn += 1; + map.virtual = 0xffff0000 + PAGE_SIZE; + map.length = PAGE_SIZE; + map.type = MT_LOW_VECTORS; + create_mapping(&map); + /* * Ask the machine support to map in the statically mapped devices. */ |