8000 T38 — Boot the guest with IPv6 disabled by minimal-foundry[bot] · Pull Request #1783 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T38 — Boot the guest with IPv6 disabled - #1783

Merged
norrietaylor merged 2 commits into
mainfrom
agent/1651-boot-the-guest-with-ipv6-disabled
Oct 1, 2026
Merged

norrietaylor merged 2 commits into
mainfrom
agent/1651-boot-the-guest-with-ipv6-disabled

Conversation

@minimal-foundry
@minimal-foundry minimal-foundry Bot commented Oct 1, 2026 •
Copy link
Copy Markdown
Contributor

T38 — Boot the guest with IPv6 disabled

slice: S9
kind: task
covers: NET-082
size: S
est: 20 code, 60 tests
executor: agent
difficulty: routine
model: light
diagnostics: the bundle's daemon log tail carries the VM boot line with the kernel command line
observability: the VM boot log line prints the kernel command line with IPv6 disabled
layers:
- vmhost:
- crates/minvmd/src/vm.rs: the base kernel command line disables IPv6; the exact-string tests follow
test: cargo nextest run -p minvmd guest_ipv6_disabled_no_v6_route
produces: none
consumes: none
proof: Inside a booted guest, the route table has no IPv6 entry and no interface carries an IPv6 address.
depends on:
- blocked by #1640

Proof

Inside a booted guest, the route table has no IPv6 entry and no interface carries an IPv6 address: every boot line now carries ipv6.disable=1 (the ipv6 module's disable parameter, effective for built-in and loadable alike), so inet6_init returns before registering anything and the guest's v6 stack never comes up — loopback's ::1 included. A person sees the line in the new composed the guest boot line info log at boot, in the kernel's Kernel command line: echo in boot.log (which min bug bundles per provider), and in the guest bundle's meta (/proc/cmdline).

Notes from the agent: Only crates/minvmd/src/vm.rs changed, per layers. The base line went from console=hvc0 to console=hvc0 ipv6.disable=1; all exact-string tests follow it (the longest-fitting RUST_LOG value shrank 2025→2010 bytes for the same 2047-byte bound); guest_ipv6_disabled_no_v6_route asserts the token by whitespace-split match on both the bare and forwarded variants. apply() now logs the composed boot line at info — the VMM child's stdout, so it shows in foreground/e2e boots; in detached boots minvmd.log does not carry it because the child deliberately does not write the shared log (boot.rs removes MINVMD_DETACHED), and there the evidence is the kernel's own Kernel command line: echo in boot.log plus the guest bundle's meta — that satisfies the diagnostics statement through what the bundle actually tails. The guest-behavior half of the proof (no v6 route, no v6 address) rests on the kernel's documented ipv6.disable=1 semantics; this box has no KVM/libkrun lane and the survey names no VM test line, so just e2e/test-vm were not run. Two doc references outside the layers went stale with this change and were left untouched: crates/minimald/src/diag.rs (~453, 'The guest boot line today is console=hvc0 plus an optional forwarded RUST_LOG') and crates/minvmd/README.md (~221, 'cmdline is just console=hvc0') — a later docs task should reword both. Guest runtime surfaces bind IPv4 or vsock o…[truncated]

Tests

line exit tail
cargo nextest run -p minvmd guest_ipv6_disabled_no_v6_route 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-8a73... Compiling ot v0.0.1 (/home/runner/.local/state/minimal/sessions/85e12/tree/crates/ot) Compiling args v0.0.1 (/home/runner/.local/state/minimal/sessions/85e12/tree/crates/args) C

Verify

min task run agent-verify passed ([tasks.verify]).

Posture and follow-up

The guest-side disable is the inside half of the posture. The host-side egress gate's drop of every foreign-family frame (T36, #1764) is the rule that survives a guest escape; ipv6.disable=1 removes the v6 family from inside the boundary, the gate enforces it. The token is one constant in crates/minvmd/src/vm.rs, retired by the IPv6 ULA dual-stack additive; the guest kernel keeps IPv6 compiled so that additive needs no kernel rebuild.

The two doc lines that quoted the old boot line (crates/minvmd/README.md, crates/minimald/src/diag.rs) were reworded by hand at 53a870f. The in-guest half of the proof (no v6 route, no v6 address on a booted guest) is tracked in #1784.

Closes #1651

The guest booted with only console=hvc0 on the kernel command line, so
the kernel's IPv6 stack came up as it always does: every interface
configured a link-local or loopback v6 address and the route table grew
v6 entries — inside the escape boundary, where nothing the host-side
egress gate decides can see or bound the family. The v1 network posture
is IPv4-only (design §4.2 keeps IPv6 ULA dual-stack as a later additive,
which retires the parameter when it lands).

The base boot line now carries ipv6.disable=1, the ipv6 module's
disable parameter (net/ipv6/af_inet6.c, parsed for built-in and
loadable alike): inet6_init returns before registering anything, so no
interface configures an IPv6 address and the route table never gains an
IPv6 entry, loopback included (NET-082).

- vm.rs composes and logs the boot line at info, so the guest was told
  what to boot with is diagnosable from the host before the guest's own
  console echo is up.
- The RUST_LOG-forwarding tests follow the new base: skipped values now
  leave console=hvc0 ipv6.disable=1, and the longest-fitting value
  shrinks by the base line's extra 15 bytes.

Tests: cargo nextest run -p minvmd guest_ipv6_disabled_no_v6_route
@minimal-foundry
minimal-foundry Bot requested a review from a team as a code owner October 1, 2026 08:08
@coderabbitai
coderabbitai Bot commented Oct 1, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 05122816-35ec-49bc-b8b5-1f6d87049751

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@minimal-foundry
minimal-foundry Bot commented Oct 1, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: no findings at 53a870f66eed.

Nothing to do.

Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.

Clobber: none: git log on the touched files shows a linear change history (T36, T31, T20 work prior) and no recent fix is reverted.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Comment thread crates/minvmd/src/vm.rs Resolved
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Babysitter review at 9733d55: one file, per the plan's layers. The base boot line gains ipv6.disable=1 (the ipv6 module's disable parameter, honoured built-in or loadable), every exact-string test follows, the longest-fitting filter test is re-derived for the 37-byte prefix, the boot line is logged at info as the diagnostics field asks, and the plan test guest_ipv6_disabled_no_v6_route asserts the token on both line shapes. The in-guest half of the proof (no v6 route, no v6 address) follows from the parameter and is not exercised by a booted guest here; that is acceptable for a size-S task whose plan test line is the unit test. Merge once minimal-review concludes and the lanes are green.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on the runtime's review findings: the coder changed nothing. Revise round with a single review thread; no change made on purpose. T38 is already satisfied by the branch head (9733d55): the base kernel command line disables IPv6 and the exact-string tests (guest_ipv6_disabled_no_v6_route and the kernel_cmdline_* family) are in crates/minvmd/src/vm.rs; the test: line was re-run and is green (1 passed, 180 skipped). The one finding (PRRT_kwDOPdfcxM6n28OV) is factually correct — crates/minvmd/README.md:221 ('cmdline is just console=hvc0') and the crates/minimald/src/diag.rs:453 doc comment ('The guest boot line today is console=hvc0 plus an optional forwarded RUST_LOG') are both stale against the new boot line — but rewording them would touch two files outside this task's layers:, which name only crates/minvmd/src/vm.rs. Per the round's scope rules the work is left undone rather than widening the diff; it needs either widened layers on this task or a docs-scoped task. The deferral is already recorded in the PR body; filing the tra…[truncated]

Review threads the coder judged:

  • 👎 invalid — crates/minvmd/src/vm.rs:40: The premise is factually correct — both lines are stale against console=hvc0 ipv6.disable=1 — but rewording them needs crates/minvmd/README.md and crates/minimald/src/diag.rs, which are outside this task's layers: (only crates/minvmd/src/vm.rs is named), so the work is left for a docs-scop

@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved at 53a870f: NET-082 posture per design §7 (guest IPv6 disabled, host gate enforces), doc lines reworded, in-guest proof tracked in #1784.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 1, 2026
@norrietaylor
norrietaylor merged commit 9f53b98 into main Oct 1, 2026
34 checks passed
@norrietaylor
norrietaylor deleted the agent/1651-boot-the-guest-with-ipv6-disabled branch October 1, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T38 — Boot the guest with IPv6 disabled

1 participant

0