Repository navigation
kernel: pin the kernel by tag, commit, release and config of record (Refs Gantt Kernel 7.4 readiness) - #2373
Conversation
Refs Gantt goal "Kernel 7.4 readiness". config/kernel.config names v7.4-rc1, the commit it points at (6628e7d4c6b2), the tag object, the release 7.4.0-rc1-1bit, the compiler, and the sha256 of os/kernel/config-7.4.0-rc1-1bit, which is the box's /boot config byte for byte. Until now the tag was prose and the config existed only on the box. tests/kernel_pin_test.sh (ctest kernel_pin) checks the pin against the file offline; --box also compares the running kernel. docs/kernel.md: the pin, and the recipe copies the committed config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ready for review at e11dafa |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at e11dafa
The pin file is byte-exact, the arms bite, and re-pinning the hash after a tamper still fails -- which is the property that makes the derived checks worth having.
$ tests/kernel_pin_test.sh . -> 15 ok, rc 0
$ sha256sum os/kernel/config-7.4.0-rc1-1bit
85749b7c0bb21223914ac454c5b895a0180e83fe0688474358cd3b42e99777a2
$ grep ^config_sha256 config/kernel.config -> the same string
Two mutations, and the second is the interesting one:
config_sha256 replaced with zeros -> FAIL its sha256 is config_sha256
the config's LOCALVERSION changed -> FAIL its sha256 is config_sha256
-> FAIL release ends with the config's LOCALVERSION
A tampered config fails twice, and the second failure survives re-pinning the hash -- release ends with the config's LOCALVERSION is derived from the file's own content, so "pin the hash to whatever the file now is" does not repair it. That is the difference between a pin and a checksum
someone can regenerate: the pin states what the config must say, not only what it hashed to.
The field agreement is real, not asserted: the committed config's own CONFIG_LOCALVERSION="-1bit" ends release=7.4.0-rc1-1bit, and its CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0" is the pin's compiler= line verbatim -- so release= and compiler= are read out of the artifact, not typed beside it.
tag_object is 40 hex in the file (bc71431221f5ba8bb33918399552636e059c2c45); the body's bc71431221f5 is its abbreviation, so the test's "sha and tag_object are 40-hex" holds. Worth knowing for a reviewer reading the body only.
And it composes with a check that already exists: config/kernel.config is a config/*.config, so tools/ci/config_pin_check.py now covers it automatically -- 4 sha pin(s) are 40 lowercase hex characters (was 3). A new pin file did not need a new checker, which is the point of having put that check on the directory rather than on three named files.
The pre-release half is scoped correctly: --box compares uname -r and /boot/config-<release>, and the body says it is "the pre-release check on the box, not a CI row" -- so the offline arm is what CI runs and the on-box arm is what a release does, with no pretence that CI can do the second.
Not run: --box (needs uname -r = 7.4.0-rc1-1bit and the matching /boot/config, i.e. the reference box at release time).
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ready for review at fdd5545 Merged main after #2371 landed. The only conflict was the CMakeLists registration block, where both PRs added a row at the same anchor; the resolution keeps both,
The diff against main is unchanged from e11dafa (6 files). |
|
Failed to review PR |
|
VERDICT: READY at Match to the byte. And the row is registered, What I like beyond the mechanics. One thing to make explicit, because the test's output is stronger than its evidence. This line passes offline: It proves the shape of Nothing blocking; I would merge this and take the naming/ |
|
VERDICT: READY at The pin, as it stands
Verified myself:
And the test runs: My own mistake, offered as the fixMy first check was Two asks
|
Refs Gantt goal "Kernel 7.4 readiness". This is the second half of the pin audit in #2371, item (f): the kernel was not pinned anywhere in the tree.
Before
v7.4-rc1was named only in prose (docs/kernel.md)./boot/config-7.4.0-rc1-1biton the reference box; the recipe saidcp <box>:/boot/config-….v7.4-rc2is already tagged upstream (7475ea8b5861), so the next bump would have started with archaeology.This PR
config/kernel.confignames:tag=v7.4-rc1;sha=6628e7d4c6b25c8d18f1345e3a20d21829aae7e4, the commitrefs/tags/v7.4-rc1^{}points at on git.kernel.org;tag_object=bc71431221f5;release=7.4.0-rc1-1bit;compiler=gcc (Ubuntu 15.2.0-16ubuntu1) 15.2.0;config_sha256of the config of record.os/kernel/config-7.4.0-rc1-1bitis the box's/boot/config-7.4.0-rc1-1bitbyte for byte (sha25685749b7c…77a2). I read it for secrets and paths first: the signing key entry is the default relativecerts/signing_key.pem, with no key material, no trusted-key list, no initramfs source and no home path. It is exempt from the notice check, because a header would make it a different file from the one that booted.tests/kernel_pin_test.sh(ctestkernel_pin, offline) checks that:shaandtag_objectare 40-hex;LOCALVERSIONandCC_VERSION_TEXTagree withrelease=andcompiler=;--boxalso comparesuname -rand/boot/config-<release>; that is the pre-release check on the box, not a CI row.docs/kernel.mdgains "The pin", and the build recipe now copies the committed config.The compiler line records what built the image: gcc, as the docs' own "config of record" bullet already measured. Whether the
LLVM=1recipe or the image should change stays a kernel-lane decision. This PR changes neither.Evidence (e11dafa)
🤖 Generated with Claude Code