Presence of any VM_PROT bits in the permission argument on x86 implies
that the entry is readable and valid. Reported by: markj Submitted by: alc Tested by: pho (previous version), markj MFC after: 3 days
This commit is contained in:
parent
ae9e9b4fda
commit
490356e5b7
@ -3845,7 +3845,8 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
|
||||
pt_entry_t *pte, PG_G, PG_M, PG_RW, PG_V;
|
||||
boolean_t anychanged, pv_lists_locked;
|
||||
|
||||
if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
|
||||
KASSERT((prot & ~VM_PROT_ALL) == 0, ("invalid prot %x", prot));
|
||||
if (prot == VM_PROT_NONE) {
|
||||
pmap_remove(pmap, sva, eva);
|
||||
return;
|
||||
}
|
||||
|
@ -3161,7 +3161,8 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot)
|
||||
pt_entry_t *pte;
|
||||
boolean_t anychanged, pv_lists_locked;
|
||||
|
||||
if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
|
||||
KASSERT((prot & ~VM_PROT_ALL) == 0, ("invalid prot %x", prot));
|
||||
if (prot == VM_PROT_NONE) {
|
||||
pmap_remove(pmap, sva, eva);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user