Prev Next | Secure Lazy Binding | Slide #25 |
Copy new data into buffer in kernel
for each block:
uvm_map_extract(map, baseva, PAGE_SIZE, &kva, UVM_EXTRACT_FIXPROT)
force copy-on-write resolution
map that userspace VA into the kernel map, with max permitted permissions
bcopy(buffer, kva + offset, len)
update the page via the kernel mapping
actually use word-sized writes
uvm_unmap_remove(kernel_map, kva, kva+PAGE_SIZE, &dead_entries, FALSE, TRUE)
remove the page from the kernel map
uvm_unmap_detach(&dead_entries, AMAP_REFALL)
clean up/release references to backing objects
EuroBSDCon 2014 | Copyright © 2014 Philip Guenther |