mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
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
2 changed files with 4 additions and 2 deletions
|
|
@ -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 a new issue