You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently no way to dynamically load code into the rump kernel and keep the W^X invariant. You can allocate executable memory using the rumpuser_anonmmap() hypercall, but you can't make it !executable.
A few options:
don't care (easy)
implement sufficient parts of pmap in rump kernels to allow to change page protection. However, this breaks the rump kernel paradigm where memory is completely managed by the host. Also, we'll have to change protection for every single pmap_protect() call and/or implement a convoluted caching mechanism (a la the kernel pmaps)
add interfaces to the NetBSD kernel to explicitly state that code is being loaded to some address, and that loading is done. e.g. uvm_codeload_alloc(size), uvm_codeload_start(sva, eva), uvm_codeload_done(sva, eva), uvm_codeload_free(va, size) (but with better names). We could then pass this info directly to a rump kernel hypercall, which could not only handle protection, but also any necessary icache flushing (if any).
something else, what?
The text was updated successfully, but these errors were encountered:
Per discussion on irc with @justincormack (cc Alex @alnsn):
There is currently no way to dynamically load code into the rump kernel and keep the W^X invariant. You can allocate executable memory using the rumpuser_anonmmap() hypercall, but you can't make it !executable.
A few options:
The text was updated successfully, but these errors were encountered: