From 1e6ca2a464ab126c93a1b468d295b7fdeeeac701 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Thu, 17 Nov 2011 15:51:03 +0000 Subject: [PATCH] Wire the kernel text RWX, rather than RX. We're not quite ready for having kernel text non-writable, because we still need to apply relocations. On top of that, the PBVM page table has all pages marked as RWX, so it's an inconsistency to begin with. --- sys/boot/ia64/common/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/boot/ia64/common/exec.c b/sys/boot/ia64/common/exec.c index 65886fa87f93..b721f97b43af 100644 --- a/sys/boot/ia64/common/exec.c +++ b/sys/boot/ia64/common/exec.c @@ -187,7 +187,7 @@ mmu_setup_paged(struct bootinfo *bi) pa = ia64_va2pa(ia64_text_start, &ia64_text_size); ia64_text_size = sz; /* XXX */ shft = sz2shft(ia64_text_start, ia64_text_size); - shft = mmu_wire(ia64_text_start, (uintptr_t)pa, shft, PTE_AR_RX); + shft = mmu_wire(ia64_text_start, (uintptr_t)pa, shft, PTE_AR_RWX); ia64_copyin(&shft, (uintptr_t)&bi->bi_text_mapped, 4); /* Wire as much of the data segment as well. */