1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Actually set the "no execute" bit on 1 MB page mappings in pmap_protect().

Previously, the "no execute" bit was being set directly in the PTE, instead
of the local variable in which the new PTE value is being constructed.  So,
when the local variable was finally assigned to the PTE, the "no execute"
bit setting was lost.
This commit is contained in:
Alan Cox 2014-07-15 17:16:06 +00:00
parent fae9277339
commit 87dd8ef960
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=268693

View File

@ -2846,7 +2846,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
eva >= next_bucket) {
l1pd &= ~(L1_S_PROT_MASK | L1_S_XN);
if (!(prot & VM_PROT_EXECUTE))
*pl1pd |= L1_S_XN;
l1pd |= L1_S_XN;
/*
* At this point we are always setting
* write-protect bit.