Repository navigation
openvmm: pin the resolution of microVM file child paths - #1953
Merged
Pedro Henrique Penna (ppenna) merged 2 commits intoNov 22, 2026
Merged
Conversation
A microVM aggregate's file child whose host path is a bare file name, such as `seed.txt`, or a symbolic link to a regular file passed OpenVMM's validation of the child's identity, which resolves the path from the current directory and through symbolic links, but attaching it failed (#1618): the child's volume opened the path's empty parent, or exposed the link itself, which a file child refuses. Pin microsoft/openvmm de700ffc296303ebd76d79423c6ce1fd801d1dc5, one commit on 3aefff9ba, the head of microsoft/openvmm#5218: - virtiofs: resolve a microVM file child's path as its identity does. open_microvm_volume resolves a symbolic link at the end of a file child's path to its final target, as the identity does, and makes any other path absolute, which keeps the name that the path gives, so the volume opens the directory of the file that the identity names, and the name check of #1614 applies to the name that the volume uses. Its tests fail without the change on Windows and on Linux (nvx-kvm-test). NVX passes canonical host paths, and OpenVMM's command line refuses links, so neither attaches differently: the fix serves the device's other callers. No saved state, protocol, ABI, or 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>
…admap Map position 353, the commit of microsoft/openvmm#5219, which NVX now pins at de700ffc2, 227 commits past the mapped tip: - 353, virtiofs: resolve a microVM file child's path as its identity does. open_microvm_volume opens the file that the host path of an aggregate's file child resolves to, as the child's identity does: it resolves a symbolic link at the path's end to its final target, and makes any other path absolute, which keeps the name that the path gives. A bare file name opened the path's empty parent, which failed, and a link exposed the link itself, which a file child refuses. Position 353 is not yet assigned to a PR. It fixes a defect of position 165, which no PR maps, and follows it, as position 343 does, whose name check now applies to the name that the volume uses. Replaying the commit on upstream main, bf353460f, conflicts in the microVM's fs.rs and aggregate_fs_tests.rs, which upstream main lacks, so it cannot go upstream on its own. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The cross-platform virtio-fs pin needs maintainer review because OpenVMM #5219 remains open without recorded reviews, and exact-pin provenance and prerequisite landing have not been independently verified.
No open issues 🎉
What changed in this PR
This PR pins OpenVMM’s fix for microVM file children supplied as bare relative paths or symbolic links, addressing #1618. The roadmap records the new revision and its place in the OpenVMM chain; NVX’s canonicalized attachment paths remain unchanged.
Changes:
- Updates the documented pin to
de700ffc2, chain position 353. - Updates the chain diagram, counts, and commit mapping.
- Explains the path-resolution fix, its dependencies, and why it cannot land independently upstream.
| File | Description |
|---|---|
doc/openvmm-upstream-roadmap.md |
Records position 353 and documents the file-child path-resolution fix. |
Review effort: Balanced
5 tasks done
Pedro Henrique Penna (ppenna)
deleted the
agents/issue-1618-aggregate-child-paths
branch
November 22, 2026 10:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1618
What does this pull request change?
It pins microsoft/openvmm#5219, which makes OpenVMM's virtio-fs device attach a microVM aggregate's file child through the file that the child's host path resolves to, the file whose identity the child has.
OpenVMM checks a file child's host path against the child's identity with
MicroVmAggregateChild::validate_root_path, which, likemicrovm_file_identity, canonicalizes the path: it resolves the path from the current directory, and through symbolic links to their final target.open_microvm_volume, which opens the child's volume, then split the path as given: it opened the path's parent and exposed the path's last name. A bare file name, such asseed.txt, whose parent is the empty path, therefore failed to attach, withENOENTon Linux orEINVALon Windows, and so did a symbolic link to a regular file, withEACCES, since the volume exposed the link, which a file child refuses, although both passed the identity check.Now
open_microvm_volumeresolves a symbolic link at the end of a file child's path to its final target, as the identity does, and makes any other path absolute, which keeps the name that the path gives, so that the volume opens the directory of the file that the identity names and reaches the file there by its name. The name check that #1614 added, which refuses a name with\or:, applies to that name, which for a link is its target's. Directory shares and children are unchanged.NVX resolves each host path to its canonical path before it passes it to OpenVMM's command line, which canonicalizes host paths again and refuses symbolic links in them, so nothing that NVX attaches changes, and no NVX documentation changes: the fix keeps the device's validation and its attachment consistent for the device's other callers.
No version is created or bumped: no ABI, machine-contract, time-ABI, snapshot, manifest, saved-state, schema, or protocol version changes, in NVX or in OpenVMM, and no saved-state field or on-disk format changes.
Commits:
openvmm: pin the resolution of microVM file child pathsmoves the gitlink from3aefff9batode700ffc296303ebd76d79423c6ce1fd801d1dc5, the head of [DO NOT REVIEW] virtiofs: resolve a microVM file child's path as its identity does openvmm#5219, and changes nothing else. The protocol vectors and CPU profiles thatnvxcopies are unchanged.doc: map the resolution of microVM file child paths in the OpenVMM roadmapmaps the new chain position, 353, which is not yet assigned to a PR.Start with
open_microvm_volumein microsoft/openvmm#5219'svm/devices/virtio/virtiofs/src/microvm/fs.rs, then its tests inmicrovm/aggregate_fs_tests.rs:a_file_child_may_be_named_relative_to_the_current_directory,a_file_child_may_be_a_symbolic_link_to_its_file, anda_file_child_link_needs_a_target_that_its_volume_can_name.Limitations that remain: no microVM scenario attaches a file child by a relative path or a link, since NVX and OpenVMM's command line pass canonical paths; the unit tests cover both. The two tests that create symbolic links are ignored on Windows, which needs permission to create native symbolic links, as an existing virtio-fs test is; they ran on the Windows host below with that permission.
Why is this change needed?
A caller of OpenVMM's virtio-fs device that computed a file child's identity from a bare file name or from a symbolic link to the file, and checked it with
validate_root_path, got an unexpectedENOENT,EINVAL, orEACCESpartway throughVirtioFs::new_microvm_aggregate, for a path that the device had just accepted, while a directory share follows a symbolic link at its root.The defect came with OpenVMM's
d26ae8bd5, "microVM: export single host files as aggregate virtio-fs children" (roadmap position 165), whoseopen_microvm_volumesplit the path as given, while its identity functions canonicalize it.Kept from the issue's suggested fix: a link resolves to its final target, as a directory share's root does, and a bare name opens the current directory. Changed:
std::path::absolute, rather than given.as its parent, which also resolves a drive-relative Windows path, such asC:seed.txt, against its drive's current directory, where its parent would have named the drive's root.canonicalizeturns a path to the default stream of a file,file::$DATA, into the file's own path, which the check of openvmm: virtiofs: microVM aggregate file child with ':' or '\' in host filename attaches successfully but fails every guest lookup with EINVAL #1614 would then accept, and it turns a name into its on-disk case or long form, which would change the name that a snapshot records for a path that attached before.Rejected: refusing links in
microvm_file_identity, which would make a file child refuse what a directory child and the identity's documented resolution accept.How was this change validated?
Checks and results:
OpenVMM, with Rust 1.97.1,
cargo nextest run --profile agent -p virtiofsat the pin, and the new tests with the fix reverted:3aefff9ba, the pin's parent:a_file_child_may_be_named_relative_to_the_current_directoryfails withfailed to initialize filesystem volume: EINVAL, anda_file_child_may_be_a_symbolic_link_to_its_filewithEACCES--run-ignored all28f2e5793, openvmm: virtiofs: microVM aggregate file child with ':' or '\' in host filename attaches successfully but fails every guest lookup with EINVAL #1614's change, before the stack's rebase: all three new tests fail, the bare name withENOENT, the links withEACCES, and the link namedlink:targetbecause of its own nameCAP_SETUID), as at the baseThe pinned commit is the rebase of
87455693c, on which the Linux failures above were recorded, andgit range-diffshows its patch unchanged.At the pin,
cargo check,cargo clippy --all-targets, andcargo doc --no-depsforvirtiofspass without warnings on Windows, andcargo clippy --all-targetson nvx-kvm-test;cargo xtask fmt --fixchanges nothing.python scripts/local_gates.py --base origin/agents/issue-1608-link-unlinked --only test-changes markdown-links test-layout openvmm-vectors openvmm-cpu-profiles --runon Windows: all five pass.python -m unittest scripts/test_openvmm_pin.pypasses.python scripts/openvmm_pin.py source de700ffc2 --pr 5219reports a good signature and the pull request's head;check-branch --topic --target origin/agents/issue-1608-link-unlinkedandcheck-roadmap --worktreepass;python scripts/check_markdown_links.pypasses;python scripts/check_test_changes.py --base origin/agents/issue-1608-link-unlinkedlists no change to an existing test.python scripts/nvx.py check-openvmm-ci --revision de700ffc296303ebd76d79423c6ce1fd801d1dc5passes: OpenVMM's CI of the pin, run 44987335572, passedunit tests [x64-linux],unit tests [x64-windows], andrun vmm-testsofx64-linux-amd-kvm,x64-linux-intel-mshv,x64-windows-intel, andx64-windows-amd.MicroVM checks on nvx-kvm-test, on KVM, with OpenVMM built from the pin by
python3 scripts/nvx.py build-openvmm --backend kvm, whose provenance namesde700ffc2from a clean tree, and the guest artifacts of releasev0.1.0-dev.b2a67fb3a53a, fromnvx download --hypervisor kvm: the virtio-fs scenariosplatform-filesystem,filesystem-snapshot,filesystem-shares,filesystem-policy,filesystem-owner,denied-filesystem-paths,platform-aggregate-export, andfilesystem-comma-pathspass, in onepython3 scripts/nvx.py test-microvm --backend kvm --scenario NAME ...run.filesystem-sharesandplatform-aggregate-exportattach file children, cold and through a snapshot. They ran in a worktree ofdevata9001c2ab, whosescripts/are this head's, with the pin's OpenVMM staged as its gitlink, since this head has no release within the 20 first-parent commits thatdownloadsearches.filesystem-ownerran unprivileged, so OpenVMM could not assume other host identities, and it checked that guest root and foreign callers fail withEPERM.Backend, host OS, host type, and guest: the unit tests ran on Windows 11 (local) and on Azure Linux 3.0 (nvx-kvm-test, a KVM virtual machine); the microVM checks ran on nvx-kvm-test, on KVM, with the Alpine guest.
Left to CI: the full NVX matrix, on KVM, MSHV, and WHP, for this head.
Checklist
python3 scripts/check_test_layout.pychecks.python3 scripts/check_test_changes.py --base origin/devlists no changeto an existing test, or a Changes to existing tests section below
explains each one.
.github/copilot-instructions.mdand the skills when a convention orworkflow changes.
nvxupdatesnvx-rs/public-api/withpython3 scripts/public_api.py --update.description says how the change versions or migrates them.
OpenVMM pin
3aefff9ba, the head of [DO NOT REVIEW] virtiofs: refuse to link a node whose last name is gone openvmm#5218 (openvmm: virtiofs: FUSE_LINK on an unlinked node links whatever new file occupies its stale path #1608):de700ffc2virtiofs: resolve a microVM file child's path as its identity does. It changes no existing test.de700ffc296303ebd76d79423c6ce1fd801d1dc5, the pull request's exact head, signed.agents/issue-1608-link-unlinked), and [DO NOT REVIEW] virtiofs: resolve a microVM file child's path as its identity does openvmm#5219 on [DO NOT REVIEW] virtiofs: refuse to link a node whose last name is gone openvmm#5218; only this pull request's two commits, and only [DO NOT REVIEW] virtiofs: resolve a microVM file child's path as its identity does openvmm#5219's top commit, belong to openvmm: virtiofs: microVM aggregate file child accepts bare relative paths and symlinks in identity validation but fails in open_microvm_volume #1618.feature/microvm/devat2a483a06f, position 349, and the NVX pull requests below this one.bf353460f, lacks the defect, since it lacks the microVM profile and its file children, and replaying the commit there conflicts in the microVM'sfs.rsandaggregate_fs_tests.rs, which upstream main lacks, so it cannot go upstream on its own.feature/microvm/devtode700ffc296303ebd76d79423c6ce1fd801d1dc5(OpenVMM's merge button squashes, which would leave the pin off the branch); then merge this pull request, after openvmm: pin the refusal to link a node whose last name is gone #1951.