summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2016-07-27 21:12:49 +0000
committerpatrick <patrick@openbsd.org>2016-07-27 21:12:49 +0000
commitf8fff3e0fadb113f3555bef2ae6fb548b5655450 (patch)
treee535258b5db566a386a51598787911d28d134746 /lib/libc
parentit should not be necessary for yacc to use TMPDIR, /tmp is good enough. (diff)
downloadwireguard-openbsd-f8fff3e0fadb113f3555bef2ae6fb548b5655450.tar.xz
wireguard-openbsd-f8fff3e0fadb113f3555bef2ae6fb548b5655450.zip
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 'lib/libc')
0 files changed, 0 insertions, 0 deletions