Repository navigation
T38 — Boot the guest with IPv6 disabled - #1783
Conversation
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
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Approved: no findings at 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: |
There was a problem hiding this comment.
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.
|
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 Review threads the coder judged:
|
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 lineinfo log at boot, in the kernel'sKernel 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=hvc0toconsole=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 ownKernel 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
cargo nextest run -p minvmd guest_ipv6_disabled_no_v6_routeVerify
min task run agent-verifypassed ([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=1removes the v6 family from inside the boundary, the gate enforces it. The token is one constant incrates/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