Skip to content

gce-linux-detonation: the detonation kernel, bootable on a Compute Engine host - #1553

Closed
bryan-minimal wants to merge 1 commit into
mainfrom
gce-linux-detonation
Closed

bryan-minimal wants to merge 1 commit into
mainfrom
gce-linux-detonation

Conversation

@bryan-minimal

Copy link
Copy Markdown
Member

Why

The Package Build Log's sensor was written for the detonation kernel (virtio-linux-detonation). The build hosts run it on the stock Ubuntu kernel instead, whose BPF settings we do not choose. virtio-linux-detonation cannot boot those hosts: it is a microVM guest kernel with virtio drivers only, and C4 / C4A instances present NVMe disks and a gVNIC network card.

Running each build inside a microVM on the detonation kernel is the real answer and waits for the build-box work. Until then this gives the hosts a kernel we build, with those settings exactly.

What

A new package, gce-linux-detonation: the same kernel source and version (6.18.63) as virtio-linux-detonation, with

  1. the same observability settings (BPF LSM and the LSM order, BTF, the function tracer, syscall tracepoints, kprobes and uprobes, audit), copied from that package's build.sh;
  2. what a Compute Engine host needs: UEFI and the EFI stub, NVMe, gVNIC, virtio for older machine types, ext4/xfs/squashfs, nftables as the build egress policy uses it, cgroups and namespaces, the vTPM and securityfs, AppArmor, 512 CPUs on x86, /proc/config.gz.

Everything is built in. There are no modules; the image is the whole kernel.

Checks in the build

The build fails when:

  • any of 40 observability symbols has a different value from the config virtio-linux-detonation ships (that package is a build dependency for this), or the kernel version differs;
  • a host symbol does not resolve to =y (unknown on this arch or version, or a dependency unmet: olddefconfig drops those silently);
  • anything is left =m.

Not done

  • Not booted anywhere. Nothing here shows that this kernel boots a C4 or C4A instance. The host list is my reading of what the hosts use (their startup script, systemd, snap), not a diff against Ubuntu's -gcp config, which I do not have. Expect the first boot to find something missing.
  • Not built locally. build-bot's build is the first. The host symbol check may fail on a name I got wrong for one arch.
  • No boot integration (installing the image and a GRUB entry on a host, with a one-shot boot that falls back to the stock kernel). That is an infra change, after this builds, and it should be tried on a throwaway instance first.
  • An assumption to confirm in the build: a build dependency's files appear at their own paths, so the reference config is at /usr/share/virtio-linux-detonation/config.

🤖 Generated with Claude Code

…gine host

virtio-linux-detonation has virtio drivers only and cannot boot a C4 or
C4A instance (NVMe disks, gVNIC). This is the same source and version
with the same BPF-LSM, BTF and tracing settings, plus what such a host
needs: UEFI, NVMe, gVNIC, ext4, nftables, cgroups, the vTPM, AppArmor.

The build fails when an observability setting differs from the config
virtio-linux-detonation ships, when a host symbol does not resolve to
built in, or when anything is left as a module.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@bryan-minimal

Copy link
Copy Markdown
Member Author

Closing at Bryan's call: we will not carry our own host kernel. For the record, the build stopped after 160 s at this PR's own comparison, not in the kernel build: CONFIG_CGROUP_BPF=y here (systemd on the host wants it) against not set in virtio-linux-detonation. The branch stays if this is wanted again. Next: check the stock Compute Engine kernel's config against virtio-linux-detonation's observability settings at boot.

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