summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2016-07-27 21:12:50 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2016-07-27 21:12:50 +0000
commite049a5ed128aa8ca51395580d7fb63d5ad98edca (patch)
treeae1e47841711c0cd2a439bc6e10c5971499dbe7f /sbin
parentd7c2882260b907126ae8023092cb9dc8db6ed1d2 (diff)
When pmap_page_remove() is called by UVM, a physical page is to be
removed from pmaps it currently is in. To check if a virtual address pointing to that physical page has been mapped, the code uses the l2pte_valid() function. Unfortunately there is a difference between being valid and the PTE being zero. If a page is mapped but has never been accessed, it will be non-zero but invalid. In that case the PTE for that virtual address will not be zeroed and the virtual address will be removed from the vm page struct. The next time someone tries to map a page to that virtual address, other pmap code will consider the virtual address to be already mapped, even though that assumption is completely wrong. To make sure this does not happen, check the PTE for zero. This way the PTE will be zeroed correctly. The check for zero is how other ARM pmap code also handles this issue. ok kettenis@ tom@
Diffstat (limited to 'sbin')
0 files changed, 0 insertions, 0 deletions