Skip to content

Commit 7458c81

Browse files
ppennaCopilot
andcommitted
openvmm: pin the host open flags of microVM create handles
A microVM snapshot that held a file that the guest had created and kept open could fail to restore: the save succeeded, but the restore refused the handle with "saved handle has unsupported open flags" (#2129). FUSE_CREATE recorded the guest's open flags as they came, where FUSE_OPEN records the host options, without __FMODE_EXEC, O_LARGEFILE, and O_NOFOLLOW, which only the guest uses, and the restore's check of the saved flags refused __FMODE_EXEC and spelled O_LARGEFILE as x86's 0x8000. On x86-64, only a create with __FMODE_EXEC, which a Linux guest never sends, failed so; on AArch64, where O_LARGEFILE is 0x20000, every create of a 64-bit Linux guest would have. Pin microsoft/openvmm 1495ac815748e39afbf980adb45f7f32f91b3be5, the head of microsoft/openvmm#5288, one commit on 4aeb405d9, the head of microsoft/openvmm#5287, which NVX pins below this commit: - virtiofs: record the host open flags of a microVM create handle. VirtioFs::create records the host options, as VirtioFs::open does, so a save stores no guest-only flag, and reopen_flags accepts the host architecture's O_LARGEFILE, which the create handles of snapshots from earlier releases hold, rather than x86's. Its test fails without the fix on Windows and Linux, at the restore, and passes with it. At the pin, the tests of the virtiofs package pass on Windows and Linux. 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 ff716fb commit 7458c81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

0 commit comments

Comments
 (0)