Continuous Integration Usage
Relevant source files
The following files were used as context for generating this wiki page:
Continuous Integration (CI) for the gokrazy-kernel-buggy-linux-7_0 project centers on the automated assembly and verification of a specialized Linux 7.0 kernel. This kernel intentionally preserves a specific UDP GSO regression to facilitate regression testing in Tailscale's natlab/vmtest infrastructure.
The project functions as a gokrazy KernelPackage, allowing automated build systems to import and deploy the kernel as a Go module. It ensures that even if a host kernel is patched, the virtualized testing environment remains "buggy" to verify that software mitigations work correctly.
Sources: README.md:1-10, empty.go:6-9
Automated Build Pipeline
The project utilizes a bash-driven build pipeline to transform upstream Linux source code into a bootable vmlinuz image. This process is reproducible and suitable for execution within CI runners.
Build Logic Flow
The build script automates the acquisition of source code, configuration patching, and parallel compilation.
The build script handles dependencies by checking for the existence of the source tarball and directory before proceeding with curl and tar commands.
Sources: build-buggy-linux-7_0.bash:4-21
Build Configuration Requirements
The CI process relies on specific kernel configuration flags defined in config.addendum.txt. These flags enable necessary drivers for the QEMU q35 environment and network diagnostics.
| Category | Configuration Flag | Purpose |
|---|---|---|
| Networking | CONFIG_IGB | Supports Intel igb network driver for GSO tests |
| Virtualization | CONFIG_VIRTIO_PCI | Enables high-performance I/O in QEMU |
| Diagnostics | CONFIG_DYNAMIC_DEBUG | Allows runtime debugging of kernel components |
| File System | CONFIG_SQUASHFS | Supports gokrazy's root file system |
| Bug Testing | CONFIG_NET_VENDOR_INTEL | Required for the buggy UDP GSO path |
Sources: config.addendum.txt:12-15, config.addendum.txt:72-78, README.md:14-18
Integration with Testing Frameworks
The kernel is integrated into larger CI workflows, specifically within Tailscale repositories, by treating the repository as a Go module.
Module Dependency Flow
Testing environments pull the kernel using Go's module system. This allows CI pipelines to lock to specific versions of the "buggy" kernel.
For local development or pre-release testing in CI, a go.mod replacement is used to point to a local checkout of the kernel repository.
Sources: README.md:21-27, empty.go:8-9
Runtime Environment and Verification
When the CI environment boots the kernel, it uses parameters defined in cmdline.txt. These parameters ensure the kernel panics on "oops" or failures, providing immediate feedback to the CI runner.
Boot Parameters
root=/dev/sda2: Specifies the root partition.init=/gokrazy/init: Points to the gokrazy init system.panic=10: Reboots 10 seconds after a panic.oops=panic: Forces a panic on kernel oops to stop the test execution.
Sources: cmdline.txt:1
Diagnostic Checks
The vmtest image performs a specific handshake before starting tests. It verifies that the guest igb interface advertises both tx-udp-segmentation and tx-gso-partial. If these features are absent, the CI test fails, ensuring the environment is correctly configured to reproduce the targeted bug.
Sources: README.md:14-19
Summary
Continuous Integration usage of this project relies on a stable build script and Go module integration. By automating the compilation of Linux 7.0 with specific addendum configurations, the project provides a consistent, reproducible environment for testing UDP GSO regressions within the Tailscale natlab ecosystem.