summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-08-19 15:31:11 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-08-19 15:31:11 +0000
commit810555ab2251ed1a6d07c1c947e0583fbf698176 (patch)
tree5f79f2c9afc92c29896e08bfd1baa59266049b14 /sys/arch
parent5085505ebf5f7ed0b63d2a75d337320c867b4a7c (diff)
Map kernel .text read-only.
Spotted by deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/armv7/armv7/armv7_machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/armv7/armv7/armv7_machdep.c b/sys/arch/armv7/armv7/armv7_machdep.c
index aa7125907e8..15b11956ff2 100644
--- a/sys/arch/armv7/armv7/armv7_machdep.c
+++ b/sys/arch/armv7/armv7/armv7_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: armv7_machdep.c,v 1.36 2016/08/15 21:04:32 patrick Exp $ */
+/* $OpenBSD: armv7_machdep.c,v 1.37 2016/08/19 15:31:10 kettenis Exp $ */
/* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */
/*
@@ -640,7 +640,7 @@ initarm(void *arg0, void *arg1, void *arg2)
logical += pmap_map_chunk(l1pagetable, KERNEL_BASE + logical,
loadaddr + logical, textsize,
- PROT_READ | PROT_WRITE | PROT_EXEC, PTE_CACHE);
+ PROT_READ | PROT_EXEC, PTE_CACHE);
logical += pmap_map_chunk(l1pagetable, KERNEL_BASE + logical,
loadaddr + logical, totalsize - textsize,
PROT_READ | PROT_WRITE, PTE_CACHE);