Skip to content

kernel: 7.4-rc4 - #721

Merged
aledbf merged 5 commits into
mainfrom
kernel/7.4-rc4
Nov 25, 2026
Merged

aledbf merged 5 commits into
mainfrom
kernel/7.4-rc4

Conversation

@aledbf

@aledbf aledbf commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Why

Spinbox wants to run shirudo in its guests. shirudo needs the BPF signed loader's ABI and KEY_SPEC_DM_VERITY_KEYRING, which 7.3.6 lacks and 7.4-rc4 has (#720). Moving to the release candidate costs less than backporting the loader's series onto 7.3. That was the maintainer's choice.

What

  • Pin: 7.4-rc4, torvalds' tarball from git.kernel.org (sha256 9f13091e…). kernel/Dockerfile already fetched that tarball for an -rc. versions.yaml's source now says the same, so the SBOM, SOURCES and the CodeQL tree name the file that is built. TestTheKernelsSourceIsTheTarballTheBuildFetches fails if the two drift apart. I saw it fail with the CDN source.
  • Patches: 19 apply as they were. Two are forward-ported, and each says how in its note:
    • 0003: trace.h lost the declaration it used as context.
    • 0013: the helper's BTF id match moved into process_arg_ptr_to_btf_id.
  • Configuration: config-7.4-x86_64 is what the builder's olddefconfig writes, and a second build left it unchanged.
    • What dropped from 7.3's file was either no longer derived (VT_CONSOLE without VT, THP_SWAP without THP) or folded in by 7.4 (PROC_SYSCTL into SYSCTL, PER_VMA_LOCK made unconditional).
    • /dev/port was in every release so far. 7.3's file had no DEVPORT line, and olddefconfig turned it on from its default: v20261124.01's published kernel-config says CONFIG_DEVPORT=y. Lockdown refused opening it (LOCKDOWN_DEV_MEM), as it refuses ioperm and iopl (LOCKDOWN_IOPORT). It is now off with DEVMEM and PROC_KCORE, the README's policy of not building these at all, and the build checks it.
    • The build now fails when olddefconfig changes the series' file, so the committed file is the configuration that is built. That is how /dev/port went unread.
  • Versions in code: KernelSeries reads 7.4-rc4 as 7.4. ParseKernelVersion reads it as after every 7.3 and before 7.4.0, so the CVE scan never counts a fix released in 7.4 as present.

Checked

  • spin-machine-dev build kernel: checkpatch is clean on all 21 patches, every effect check holds ("each is in this vmlinux"), sparse adds no warning, and the relocation table uses 822856 of 1048576 bytes.
  • spin-machine-dev verify kernel: OK.
  • go tool task lint test mutate: clean. mutate left two survivors in my change: one is answered by a test, the other is exempt as an equivalent mutant.

Left to CI and the bench: compat.yml boots this kernel (lockdown, kaslr, record, patches). boot:ssh-first against the release, interleaved, is the versions.yaml note's last check before merging.

track: kernel in go-tools would stop following the pin at 7.4-rc5. spin-stack/go-tools#142 fixes that.

🤖 Generated with Claude Code

aledbf and others added 5 commits November 25, 2026 18:27
7.4 is the first series with the BPF signed loader's ABI shirudo needs
(KEY_SPEC_BPF_KEYRING, bpf.keyring_unsealed, bpf_inode_init_xattr) and
KEY_SPEC_DM_VERITY_KEYRING (#720), and its x86 ftrace fix. The pin is
torvalds' tarball from git.kernel.org, which kernel/Dockerfile already
fetched for an -rc; a gate holds versions.yaml's source to that tarball.

19 patches apply as they were; 0003 and 0013 are forward-ported and say
how. Every effect check holds and sparse finds nothing new.
config-7.4-x86_64 is what the builder's olddefconfig writes: it drops
symbols 7.3's file no longer derived and those 7.4 folded in
(PROC_SYSCTL into SYSCTL, PER_VMA_LOCK). 7.4 made DEVPORT an option of
its own, on by default; it stays off with DEVMEM and PROC_KCORE.

KernelSeries reads 7.4-rc4 as 7.4, and the CVE scan reads it as after
every 7.3 and before 7.4.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7.3's file had no DEVPORT line, and olddefconfig turned /dev/port on
from its default in every release up to v20261124.01, whose
kernel-config says CONFIG_DEVPORT=y; the previous commit's message took
that for a 7.4 change. Lockdown refused opening it (LOCKDOWN_DEV_MEM),
as it refuses ioperm and iopl.

The build now fails when olddefconfig changes the series' file, naming
the lines, so what the file says is what every release builds. Shown
red with the DEVPORT line taken out: "> CONFIG_DEVPORT=y".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7.4 hashes /proc/vmallocinfo's addresses (%p where 7.3 had %pK) and
prints 0 for a socket in /proc/net/unix, the two windows the check read
the direct map and vmalloc through: on 7.4-rc4 it refused vmalloc
0x4d125ee9 as not a kernel address. Root sees no other under lockdown.

The guest now finds page_offset_base, vmalloc_base and vmemmap_base in
kallsyms (kptr_restrict=1, KALLSYMS_ALL), and the host reads what they
hold through a monitor of its own with the human monitor's x, while
the guest runs: the values kernel_randomize_memory wrote, vmemmap
included where it was assumed before. checkGuest answers a console
before it looks for the end marker, so a line printed with it is read
while the machine still runs; the line is matched to its end, since a
console read half-way held an address cut short.

On the 7.4-rc4 kernel, 10 boots at spin's base shape: ten values for
each of _text, the physical base and the three regions, none at its
unrandomized base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit 8da1864 into main Nov 25, 2026
12 checks passed
@aledbf
aledbf deleted the kernel/7.4-rc4 branch November 25, 2026 22:33
aledbf added a commit that referenced this pull request Nov 25, 2026
…the kernel

GitHub's 4-vCPU runners took 21-27 min for the kernel job cold (the
kernel 10-13, then the traceable kernel 9-12 in series) and 6-9 for
QEMU (parts runs 45254983345, 45267869531, 45272669299).

- Every compile takes its parallelism from nproc inside its RUN. The
  --jobs flag, Options.Jobs and the JOBS/KERNEL_NPROC build arguments
  are gone: a build argument is BuildKit's cache key, so a runner-sized
  one gave each runner size a cache of its own.
- release traceable-kernel builds only the traceable kernel and holds
  its config to the series' committed file. Since #721 kernel/Dockerfile
  refuses a release kernel whose olddefconfig moves that file, so it is
  the release kernel's config and compiling the release kernel to read
  it was wasted.
- parts.yml's qemu, kernel and image jobs, and a new traceable job
  beside kernel, run on runs-on/fleet=build/env=production (16 vCPU).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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