Skip to content

Enable private listener rebinding for restored clones - #201

Merged
Pedro Henrique Penna (ppenna) merged 10 commits into
devfrom
esaurez/nvx-restore-listener-rebinding-20260922
Sep 24, 2026
Merged

Pedro Henrique Penna (ppenna) merged 10 commits into
devfrom
esaurez/nvx-restore-listener-rebinding-20260922

Conversation

@esaurez

@esaurez Enrique Saurez (esaurez) commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Repin current NVX dev to the OpenVMM listener-rebinding change and add bounded guest restore-stage diagnostics at the canonical shared helper path.

Why

The saved snapshot contract requires a restore-time listener attachment to equal the captured attachment byte-for-byte, including its Unix socket pathname. ACI must rotate the boot console, authenticated control socket, capability, and VMM generation for every restore. Reusing the source path would collide across independent clone restores and violate the source-generation security boundary.

Changes

  • Repin OpenVMM from current dev pin 4af1b9674f6a707c55b9059a06c529a023ceadb7 to 46b4a7bd7423e0c73e7249cd0b0a78beb455df1f.
  • Consume Allow private listener identities on snapshot restore nanvix/openvmm#95, clean linear history on current OpenVMM main; only listener endpoint identity rotates while the stable attachment contract remains captured.
  • Document restore-owned listener path identity.
  • Emit bounded, non-secret restore stage/failure markers from guest/common/nvx-snapshot while retaining fail-closed termination.
  • Assert every marker in the focused microVM source-contract test.

Current-head validation

  • NVX head 7bdcdf40dd6df57f71d64f31d9f2b9ec5ab10fa4 is based on current dev.
  • scripts/test_microvm_tests.py: 61 passed.
  • scripts/test_nvx_tools.py: 223 passed.
  • The prior WHP failure contained the correct restored byte joined to a kernel message; bounded raw-stream marker parsing now covers that interleaving.
  • sh -n guest/common/nvx-snapshot passed.
  • ruff check and ruff format --check passed for the modified Python test.
  • OpenVMM cargo +1.95 fmt -p openvmm_entry --check passed.
  • OpenVMM Windows listener filter: 4 passed, including boot and authenticated named-pipe replacement.

Authenticated E2E provenance

Pedro used NVX de0360220896e9b3ae12a81c2858a918f63fc3ad and OpenVMM 0f1681d512a7a4a0d26b6c6c745568046cebb263. The two OpenVMM restack commits have identical stable patch IDs, and the guest marker patch is identical at its moved guest/common path.

  • Linux OpenVMM focused listener tests: 5 passed.
  • Supported candidate tooling: 125 passed, 1 skipped.
  • Runtime manifest: bf0a0ce173800ca551402dc80e85131bb2d2775b5368a0e36877d548755d7ce4.
  • Archive: 893c84c37e2ca925f867b088e243fa36bf2d0d20eb797011466bf9349d24636b.
  • Pedro Tier 3 passed capture, source termination, native validation, fresh-listener restore, restore-ready, authenticated reconnect, RAM/scratch sentinels, Python READY, stop, shutdown, destroy, and residue cleanup.

The candidate is content-authenticated unsignedValidationOnly, not production-signed. The unrelated newer dev/OpenVMM main base code in the restacked PR head was not rebuilt into that candidate or rerun on Pedro; the E2E claim applies to the explicitly listed authenticated source revisions and patch-equivalent listener/helper changes.

Copilot AI balanced review requested due to automatic review settings September 23, 2026 04:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The OpenVMM pin is stale against current dev, and diagnostic coverage and documentation need correction.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Repins OpenVMM for private listener rebinding and adds guest restore diagnostics.

Changes:

  • Updates the OpenVMM revision.
  • Documents listener identity rotation.
  • Emits restore-stage and failure markers.
File Description
openvmm Updates the OpenVMM gitlink.
alpine/​nvx-snapshot Adds console diagnostics.
doc/​design/​snapshot-and-restore.md Documents listener rebinding.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread doc/design/snapshot-and-restore.md Outdated
Comment thread guest/common/nvx-snapshot
Comment thread doc/design/snapshot-and-restore.md Outdated
Repin OpenVMM to permit fresh boot and authenticated control listener endpoints while preserving the authoritative saved attachment contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Emit bounded non-secret restore stage and failure markers to the boot console while retaining fail-closed VM termination. Add a focused source-contract assertion at the helper's canonical guest/common path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2026 05:16
@esaurez
Enrique Saurez (esaurez) force-pushed the esaurez/nvx-restore-listener-rebinding-20260922 branch from de03602 to 14bad9a Compare September 23, 2026 05:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The restore documentation remains incomplete and contradictory, and nonfatal console diagnostics lack behavioral coverage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity · 1 Low severity

Open (4)
Resolved since last review (1)

Comment thread scripts/test_microvm_tests.py
Comment thread doc/design/snapshot-and-restore.md Outdated
Exercise non-fatal console diagnostics and fail-closed termination, assert restore-stage ordering, and align the listener identity contract across the design documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2026 16:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The listener contract documentation remains inaccurate, the PR conflicts with dev, and the security-sensitive OpenVMM revision lacks completed source review and checks.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
Resolved since last review (4)

Comment thread doc/design/snapshot-and-restore.md Outdated
Preserve the reviewed listener rebinding, diagnostics, and review fixes while adopting the current MP-table, TTRPC, CI, and release changes from dev.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2026 16:13
Describe listener rebinding as an optional restore-caller capability, retain the full saved attachment contract, and require clone orchestrators to provide fresh private endpoints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The security-sensitive OpenVMM source PR remained unreviewed with exact-head checks and the NVX matrix incomplete.

Review effort: Balanced
Findings: None

Resolved since last review (1)

Copilot AI review requested due to automatic review settings September 23, 2026 16:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The security-sensitive OpenVMM source revision remains unreviewed with exact-head checks still incomplete.

Review effort: Balanced
Findings: None

Consume the reviewed ordering fix that validates fresh listener replacements before reconstructing obsolete saved endpoints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The console helper’s redirection order leaks failed console-open diagnostics to stderr.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Low severity

Open (1)

Comment thread guest/common/nvx-snapshot Outdated
Redirect stderr before opening /dev/console and require the behavioral regression test to observe only the intended fail-closed message.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2026 17:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Snapshot security behavior depends on an upstream revision whose exact-head CI is still pending and whose E2E validation used patch-equivalent earlier revisions.

Review effort: Balanced
Findings: None

Resolved since last review (1)

Replace the superseded merge-history head with nanvix/openvmm#95's single commit on current main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Frame the restored scratch byte with an explicit suffix and parse it from the raw console stream so concurrent kernel output cannot turn a correct restore into a false wrong-backing failure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2026 17:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The security-sensitive cross-repository lifecycle change requires final human review and completion of the exact-head platform matrix.

Review effort: Balanced
Findings: None

Consume nanvix/openvmm#95's CLI documentation and functional named-pipe restore tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 23, 2026 17:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The security-sensitive OpenVMM pin’s exact-head CI was pending and upstream PR #95 remained blocked at review time.

Review effort: Balanced
Findings: None

@ppenna
Pedro Henrique Penna (ppenna) merged commit a9202f8 into dev Sep 24, 2026
103 of 156 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the esaurez/nvx-restore-listener-rebinding-20260922 branch September 24, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants