3 ms·
This patch uses heuristics that seem dangerous to me: > The 9P filesystem protocol relies on stateful file opens which map protocol-level FIDs to host file des
by dwheeler 2y ago
This patch uses heuristics that seem dangerous to me:
> The 9P filesystem protocol relies on stateful file opens which map
protocol-level FIDs to host file descriptors. The FreeBSD vnode
interface doesn't really support this and we use heuristics to guess the
right FID to use for file operations. This can be confused by privilege
lowering and does not guarantee that the FID created for a given file
open is always used for file operations, even if the calling process is
using the file descriptor from the original open call. Improving this
would involve changes to the vnode interface which is out-of-scope for
this import.
Where would you use something with such unreliable heuristics??
- crest 2y agoFor a read-only filesystem, as a shared directory between guest and host OS for a specific guest (and host) users, etc. It's a significant, potentially dangerous limitation, but it's still worth having in its current form. Touching the VFS interface is easier when the code consuming it is already in the tree and not to be taken lightly.