Repository navigation
nvx-rs: GPT images, the RAM upper and protected paths in nvx-rs sandbox #818
Copy link
Copy link
Open
Description
Parent: #816. Needs: #817, whose init boots a GPT distro and the tmpfs upper. Builds on #813's GPT bindings. Delivers, with #817 and #591's docs: #558.
Goal. nvx-rs sandbox run, provision and start accept every format and upper that the shared plan supports, and refuse a share that reaches the sandbox's own files.
Today (dev c5a0dd7):
--layer ROLE,PATH,EROFS_UUIDnames an EROFSdistroonly, and the CLI plans it over an ext4 scratch (host/cli/sandbox/mod.rs). The library's GPT bindings (sandbox: bind GPT disks, plan adapter launches, and stage registered images #813) are unused by the CLI.runandprovisionverify the layer when a manifest sits beside it.provisionrecords its binding, andstartchecks it without reading the layer again; both launch throughPreparedLaunch(nvx-rs: separate distro verification from launch planning #653, nvx-rs: hand the VMM the checked images of a sandbox launch #752).- The CLI refuses overlapping host paths among a sandbox's own shares, but not a share that reaches its state directory, scratch, layers or bundle.
Scope:
- Formats and uppers: a GPT
distronamed by its disk GUID, and the tmpfs upper, with exactly onenvx_overlay_upper=ramfstoken and no scratch block or token. They are planned through the typed plan forsandbox run,provisionandstart. The option forms are settled in the PR; today's EROFS forms keep their meaning. - Bindings:
provisionrecords a GPT binding (sandbox: bind GPT disks, plan adapter launches, and stage registered images #813) as it records an EROFS one, andstartchecks it by metadata only. A tmpfs sandbox records and claims no scratch. - Protected paths: a share is refused if its host path equals, contains or lies inside the sandbox's state directory, scratch, layers or bundle. Paths are compared by canonical path and by identity, at provision and again at start;
sandbox run, which has no state directory, checks the rest. - Records: the sandbox's records name its format and upper.
Not in scope: guest root assembly (#817); nvx-rs run's shares (#802); protected roots chosen by the library; image management.
Acceptance:
sandbox run,provisionandstarteach boot all four format and upper combinations on KVM, MSHV and WHP. Tests assert the selected filesystem and upper, the expected identities, the block size, and no scratch in RAM mode.- A GPT image that changed after
provisionfailsstartwithout reading content, and a wrong disk GUID fails the assembly. Conflicting upper settings are refused. - Protected-path tests cover a single share, symbolic link, junction and bind-mount aliases, and a state directory created during provision.
- Unchanged cases keep their goldens. Intended changes are limited to the format token, the protected paths and the records.
Carries over: #622's scope 7 (A4 PR 7), apart from the binding that provision already records, and the CLI's part of #622's first acceptance item.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
nvx-rs sandbox#853