Repository navigation
Commit ef2f96f
openvmm: pin the destroy of FUSE_INIT negotiations that the session discards
OpenVMM's FUSE session called the file system's Fuse::init for each
FUSE_INIT and then did not always adopt its negotiation: it failed the
request with EIO when init wanted a flag that the guest did not offer,
and, since microsoft/openvmm#5248, it adopted nothing when it could not
send the reply. In both cases, it called no Fuse::destroy
(microsoft#1900). The guest completes no such FUSE_INIT, and Linux
sends no FUSE_DESTROY for a connection that it did not initialize, so
the next FUSE_INIT called init again over what the first one had set
up. VirtioFs::init records the negotiation that it agrees to, so after
an INIT reply that the device could not send, a microVM capture failed
with "FUSE session and filesystem negotiation state disagree" until the
guest negotiated again.
Pin microsoft/openvmm 9805f89843ee01890f19d47d2f04f6460bd22024, three
commits on be75ab532, the head of microsoft/openvmm#5255, which NVX
pins below this commit:
- fuse: let FUSE_INIT negotiate only once a session has ended.
Session::destroy takes the session's lock before it marks the session
uninitialized and calls Fuse::destroy, as dispatch_init does before it
calls Fuse::init, so a FUSE_INIT that the session dispatches once it
is uninitialized negotiates only once the session has ended, and the
session calls init and destroy one at a time. Its test fails without
the change, on Windows.
- fuse: call destroy after an init that the session does not adopt.
dispatch_init calls Fuse::destroy right after an init whose
negotiation it refuses or whose reply it cannot send, under the
session's lock, and the session's documentation pairs each init with
one destroy, before the next init. Its four tests that fail without
the change, among them a microVM save after an INIT reply that
cannot be sent, pass with it, on Windows.
- fuse: say which FUSE_INIT waits for the end of a session.
Comments only: a FUSE_INIT that the session dispatches before
Session::destroy marks it uninitialized fails as a duplicate, as on
any initialized session, and only a later one waits for the end of
the session, which Session::destroy and the first commit's test now
say.
A FUSE_INIT whose reply is sent negotiates, replies, saves, and
restores as before. No saved-state, protocol, or ABI format, and no
version of any of them, changes. The protocol vectors and CPU profiles
that nvx copies are unchanged.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent d109b59 commit ef2f96f
1 file changed
Lines changed: 1 addition & 1 deletion
0 commit comments