Prev Next | Secure Lazy Binding | Slide #18 |
OpenBSD/amd64 has "direct pmap": direct map in VA always maps all PA
Copy new data into buffer in kernel
uvm_fault(map, baseva, VM_FAULT_WIRE, VM_PROT_NONE)
force copy-on-write resolution
force page to be physically in memory and unpageable
physical page has "maximal" permissions for mapping
pmap_extract(map->pmap, baseva, &paddr)
kva = PMAP_DIRECT_MAP(paddr)get kernel's direct mapped address of the underlying physical page
bcopy(buffer, kva + offset, len)
update the wired-in physical page
uvm_fault_unwire(map, last_baseva, last_baseva + PAGE_SIZE)
permit page to be paged again
EuroBSDCon 2014 | Copyright © 2014 Philip Guenther |