Change pmap_enter_quick() to use the vm_prot_t parameter introduced in
revision 1.179 to correctly set/clear execute permission on the mapping it creates. Thus, mmap(2)ing a memory resident file will not result in the file being mapped with execute permission when execute permission was not requested. Eliminate an unneeded Instruction Memory Barrier (IMB) in pmap_enter_quick(). Since there was no previous (instruction) mapping for the given virtual address prior to pmap_enter_quick(), there can be no instructions from the given virtual address in the pipeline that need flushing. MFC after: 1 week
This commit is contained in:
parent
5b40ce27b2
commit
4e067a8592
@ -1941,11 +1941,12 @@ pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
pmap->pm_stats.resident_count++;
|
||||
|
||||
/*
|
||||
* Now validate mapping with RO protection
|
||||
* Validate the mapping with limited access, read and/or execute but
|
||||
* not write.
|
||||
*/
|
||||
*pte = pmap_phys_to_pte(VM_PAGE_TO_PHYS(m)) | PG_V | PG_KRE | PG_URE | managed;
|
||||
*pte = pmap_phys_to_pte(VM_PAGE_TO_PHYS(m)) | PG_V | pte_prot(pmap,
|
||||
prot & (VM_PROT_READ | VM_PROT_EXECUTE)) | managed;
|
||||
out:
|
||||
alpha_pal_imb(); /* XXX overkill? */
|
||||
PMAP_UNLOCK(pmap);
|
||||
return mpte;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user