kernel - Document bugs in sendfile that we currently punt on
* sendfile tries to soft-busy the VM pages it backs the mbuf with. This
is meant to prevent the VM page's data from being modified while TCP
is playing with it. However, it doesn't work. There are two issues.
* (1) The page still may be mmap()'d writable. A simple vm_page_protect()
would fix this.
* (2) The page may be associated with a buffer cache buffer and can be
modified via a VOP_WRITE through that buffer regardless of whether
soft-busy or busy is set. This is a real problem.
Even if we find and discard the buffer it can just be reinstantiated
and wind up with the same problem.
From-discussion-with: jeffr, rookie on IRC