Skip to content

kernel: the release is its vmlinux alone; no bzImage, no LZ4 (#660) - #711

Merged
aledbf merged 3 commits into
mainfrom
kernel/660-vmlinux-only-2
Nov 23, 2026
Merged

aledbf merged 3 commits into
mainfrom
kernel/660-vmlinux-only-2

Conversation

@aledbf

@aledbf aledbf commented Nov 23, 2026

Copy link
Copy Markdown
Member

Why

The goal is a cold first SSH login under 100 ms. Since #645 (v20261123.07) the machine boots a release's self-randomizing vmlinux through PVH. The bzImage a release still carried was booted by nothing, so it was only build time, release size and code to maintain. The maintainer decided to stop building and shipping it now, without waiting for spin (#660, last comment).

What changes

  • kernel/Dockerfile builds vmlinux, not all. CONFIG_KERNEL_LZ4 goes, and so does the builder's lz4. The compression mode falls back to Kconfig's default, gzip, which compresses nothing that ships. The bzImage copy, its setup-header asserts and the final stage's kernel/bzImage are gone.
  • Kernel 0018 is deleted. It is Hou's RFC patch to arch/x86/boot/compressed/ (misc.c and its Makefile), which only the decompressor uses. Nothing compiles that directory any more, so the hunk was dead and its "in this vmlinux" assert only grepped source. With no carried patch touching compressed/, sparse's make V=1 C=1 bzImage path is gone too. CodeQL's kernel analysis (internal/patched) now builds vmlinux for the relocs tool where it built the bzImage. 0014-0017, 0019 and 0020, the relocation table and every per-patch assert stay.
  • The release (internal/release) packs, hashes (SBOM) and describes (SOURCES) kernel/vmlinux alone. verify kernel keeps SelfRandomizing (notes, filled .data.reloc) and the BTF check, and stops reading a setup header (build.Relocatable deleted). release still refuses a tree missing kernel/vmlinux or qemu/pvh.bin, and there are new cases for both in TestAReleaseMissingAnythingIsRefused.
  • machine.OpenRelease keeps its bzImage path. Its callers here still open v20261119.02..v20261123.06: lab tree --from release:TAG and lab compat.
  • lab compat used to stop at the first release with no bzImage, meaning one older than v20261119.02. Every release from this one on has no bzImage either, so compat now stops at the first release machine.OpenRelease refuses, and the row says why.
  • boot:here puts the built kernel/vmlinux in the tree, not kernel/bzImage. Without that, compat on a kernel change would silently boot the release's kernel. parts.yml uploads no bzImage.
  • Docs: kernel/README.md, README.md, docs/releasing.md and docs/cli.md. docs/boot-time.md moves the KERNEL_LZ4 row into "Measured and rejected" together with the bzImage and 0018, and changes the budget: the decompressor's copy, LZ4 and parse_elf, 21 ms (bench) before the kernel's clock #645 row from 0014-0018 to 0014-0017. docs/log.md has a dated entry.

For spin. Releases from this one on have no kernel/bzImage. spin's hack/machine/place.go must stop requiring it before it takes one (spin-stack/spin#1689).

Stacked on #700 (#697)

This PR merges lab/697-traceable-vmlinux and targets it, so it lands after #700. Without #700, release traceable-kernel (run by parts.yml and release.yml) would copy a bzImage the build no longer makes, and lab tree --kernel run:N would refuse a run with no bzImage. Gate fails at "coverage 92.93%, below 93%", which #700 reads too (reported there).

Check

The boot path is unchanged. ssh-first on bench (nested, spin's shape and login, 20 a side, interleaved, both arms with v20261123.07's spin-machine) compared v20261123.07 with the same release carrying this PR's kernel (parts run 45258752104). First login −4.3 ms [−14.4, +7.4], sshd accepting −5.3 [−11.1, +7.0], QEMU's RSS −1.7 MiB, all within noise (lab 45262046768). The arm's kernel is also main's 7.3.6 against .07's 7.3.5.

Refs #660.

🤖 Generated with Claude Code

Replaces #701, whose branch merged #697's pre-rebase branch: #660's three commits cherry-picked onto main (which now has #697 via #708, #698 via #710, #627 via #699). Two conflicts: internal/lab/compat.go takes this PR's OpenRelease check over #697's bzImage check; docs/boot-time.md keeps main's 0009 row and this PR's PVH row (0018 out), and drops this PR's edit of the 0007 row, which main removed (#702). task test on the rebased branch: coverage 93.01% of what CI runs (#701's CI read 93.00%, under the floor).

aledbf and others added 3 commits November 23, 2026 18:18
Since #645 the machine boots a release's vmlinux through PVH, and nothing
boots the bzImage a release still carried for spin's place.go. The kernel
build now makes vmlinux only: no bzImage, no CONFIG_KERNEL_LZ4 (the
compression mode is Kconfig's default and compresses nothing shipped),
no lz4 tool in the builder, and patch 0018, which changed only the
decompressor, is deleted because nothing compiles it. sparse no longer
rebuilds a bzImage to check the decompressor; CodeQL's kernel analysis
makes vmlinux for the host tools instead of the bzImage.

The release packs, hashes and describes kernel/vmlinux alone; verify
kernel checks the vmlinux and no setup header. machine.OpenRelease keeps
reading releases from v20261119.02 to v20261123.06 that boot a bzImage:
the lab and compat open them. compat stops at the first release
OpenRelease refuses, not at the first without a bzImage, which every
release from this one on is. spin's place.go must stop requiring
kernel/bzImage (spin-stack/spin#1689).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…changed (#660, lab 45262046768)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit d88601e into main Nov 23, 2026
12 checks passed
@aledbf
aledbf deleted the kernel/660-vmlinux-only-2 branch November 23, 2026 21:44
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.

1 participant