From 0fb82267083457acd4a6172331e41794db15cf54 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 15 Jul 2026 15:15:59 +0000 Subject: [PATCH] gokrazy, tstest, cmd/vnet: switch amd64 kernel to gokrazy/kernel.amd64 The tailscale/gokrazy-kernel module was a fork of rtr7/kernel that stalled at Linux 6.8.9 (July 2024). All of the kernel config options we had added in that fork (ENA, Xen for EC2, virtio-mmio for qemu microvm, virtio RNG, IPv6 policy routing, netlink diag, etc) are now present in the gokrazy project's own gokrazy/kernel.amd64 module, which tracks current kernel.org releases (Linux 7.1.3 as of this change) and is the gokrazy project's supported kernel for x86_64 PCs and VMs. Switch the tsapp and natlabapp images, the natlab VM tests, and the CI workflow to gokrazy/kernel.amd64, drop the tailscale/gokrazy-kernel dependency, and update gokrazy/kernel.arm64 to latest while here. Verified with TestEasyEasy, TestJustIPv6, and TestTailscaleSSH in tstest/natlab/vmtest with --run-vm-tests. Updates #1866 Signed-off-by: Brad Fitzpatrick Change-Id: I90c3765a4e18f5609b4d77b51ac38d17c8e3688a --- .github/workflows/natlab-test.yml | 6 +++--- cmd/vnet/run-krazy.sh | 2 +- flake.nix | 2 +- flakehashes.json | 4 ++-- go.mod | 4 ++-- go.sum | 8 ++++---- gokrazy/gokrazy_test.go | 8 ++++---- gokrazy/natlabapp/config.json | 2 +- gokrazy/natlabapp/gokrazydeps.go | 2 +- gokrazy/tsapp/config.json | 4 ++-- gokrazy/tsapp/gokrazydeps.go | 2 +- shell.nix | 2 +- tstest/integration/nat/nat_test.go | 2 +- tstest/natlab/vmtest/vmtest.go | 6 +++--- 14 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/natlab-test.yml b/.github/workflows/natlab-test.yml index fa64fafc5..05dea6d0d 100644 --- a/.github/workflows/natlab-test.yml +++ b/.github/workflows/natlab-test.yml @@ -165,13 +165,13 @@ jobs: key: natlab-gokrazy-${{ github.sha }} # The gokrazy-based tests boot the kernel directly from - # vmlinuz that ships in the tailscale/gokrazy-kernel module. + # vmlinuz that ships in the gokrazy/kernel.amd64 module. # Tests look it up under GOMODCACHE via findKernelPath, so the # module has to be present even though no Go source imports it # in the test package itself. - - name: Download gokrazy-kernel module + - name: Download kernel.amd64 module run: | - ./tool/go mod download github.com/tailscale/gokrazy-kernel + ./tool/go mod download github.com/gokrazy/kernel.amd64 - name: Run ${{ matrix.test }} # Per-test timeout is well above the few-minute typical runtime diff --git a/cmd/vnet/run-krazy.sh b/cmd/vnet/run-krazy.sh index a55da6b95..d00abd5c1 100755 --- a/cmd/vnet/run-krazy.sh +++ b/cmd/vnet/run-krazy.sh @@ -12,7 +12,7 @@ set -eux qemu-system-x86_64 -M microvm,isa-serial=off \ -m 1G \ -nodefaults -no-user-config -nographic \ - -kernel $HOME/src/github.com/tailscale/gokrazy-kernel/vmlinuz \ + -kernel $HOME/src/github.com/gokrazy/kernel.amd64/vmlinuz \ -append "console=hvc0 root=PARTUUID=60c24cc1-f3f9-427a-8199-76baa2d60001/PARTNROFF=1 ro init=/gokrazy/init panic=10 oops=panic pci=off nousb tsc=unstable clocksource=hpet tailscale-tta=1 tailscaled.env=TS_DEBUG_RAW_DISCO=1 ${EXTRA_ARG}" \ -drive id=blk0,file=$HOME/src/tailscale.com/gokrazy/natlabapp.img,format=raw \ -device virtio-blk-device,drive=blk0 \ diff --git a/flake.nix b/flake.nix index 8ddf2d355..ea8fb1a2d 100644 --- a/flake.nix +++ b/flake.nix @@ -173,4 +173,4 @@ }); }; } -# nix-direnv cache busting line: sha256-48z3snHndd96fJtvNbK+fnzTs4W6VfrWxL1l8HXRAQI= +# nix-direnv cache busting line: sha256-y7ZgrxWeeUYG+FKL9Ym8QmqaQsGnUVc9GXkA4na/AJI= diff --git a/flakehashes.json b/flakehashes.json index d64ef338b..f921033f1 100644 --- a/flakehashes.json +++ b/flakehashes.json @@ -4,7 +4,7 @@ "sri": "sha256-TwIaPmGVHO9ZwdaO/jDStgWGQtKa4smS3er1i5aTNTw=" }, "vendor": { - "goModSum": "sha256-6RZ9xk8/PtnZA9Y7sAggn40lESnQFgYWwIPuv4IOhDg=", - "sri": "sha256-48z3snHndd96fJtvNbK+fnzTs4W6VfrWxL1l8HXRAQI=" + "goModSum": "sha256-sKqNU5HU/3NOzvAYcdYsMocYsvr1xpM4Ch4SWsH9dVg=", + "sri": "sha256-y7ZgrxWeeUYG+FKL9Ym8QmqaQsGnUVc9GXkA4na/AJI=" } } diff --git a/go.mod b/go.mod index f6eb42cc3..f8578dff2 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,8 @@ require ( github.com/gokrazy/breakglass v0.0.0-20251229072214-9dbc0478d486 github.com/gokrazy/firmware v0.0.0-20260522070551-527ce0ed43cf github.com/gokrazy/gokrazy v0.0.0-20260418085648-c38c3134b8a7 - github.com/gokrazy/kernel.arm64 v0.0.0-20260403054012-807489e0272a + github.com/gokrazy/kernel.amd64 v0.0.0-20260705070735-de680abf072b + github.com/gokrazy/kernel.arm64 v0.0.0-20260705071517-37841c4d6ff1 github.com/gokrazy/kernel.rpi v0.0.0-20251127164438-9778ec0261de github.com/gokrazy/rpi-eeprom v0.0.0-20260518070910-95f7328a8228 github.com/gokrazy/serial-busybox v0.0.0-20250119153030-ac58ba7574e7 @@ -102,7 +103,6 @@ require ( github.com/tailscale/depaware v0.0.0-20251001183927-9c2ad255ef3f github.com/tailscale/gliderssh v0.3.4-0.20260603235856-90d7dcbcbf38 github.com/tailscale/goexpect v0.0.0-20210902213824-6e8c725cea41 - github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e github.com/tailscale/golang-x-crypto v0.0.0-20250404221719-a5573b049869 github.com/tailscale/hujson v0.0.0-20260302212456-ecc657c15afd github.com/tailscale/mkctr v0.0.0-20260107121656-ea857e3e500b diff --git a/go.sum b/go.sum index edc480f32..6d4e38fb6 100644 --- a/go.sum +++ b/go.sum @@ -522,8 +522,10 @@ github.com/gokrazy/gokrazy v0.0.0-20260418085648-c38c3134b8a7/go.mod h1:NtMkrFeD github.com/gokrazy/internal v0.0.0-20200407075822-660ad467b7c9/go.mod h1:LA5TQy7LcvYGQOy75tkrYkFUhbV2nl5qEBP47PSi2JA= github.com/gokrazy/internal v0.0.0-20251208203110-3c1aa9087c82 h1:4ghNfD9NaZLpFrqQiBF6mPVFeMYXJSky38ubVA4ic2E= github.com/gokrazy/internal v0.0.0-20251208203110-3c1aa9087c82/go.mod h1:dQY4EMkD4L5ZjYJ0SPtpgYbV7MIUMCxNIXiOfnZ6jP4= -github.com/gokrazy/kernel.arm64 v0.0.0-20260403054012-807489e0272a h1:fa11POmSLo6fkkcqc+RUIyiqGJzBAOHEe/CCHAA/NGc= -github.com/gokrazy/kernel.arm64 v0.0.0-20260403054012-807489e0272a/go.mod h1:WWx72LXHEesuJxbopusRfSoKJQ6ffdwkT0DZditdrLo= +github.com/gokrazy/kernel.amd64 v0.0.0-20260705070735-de680abf072b h1:H9m4mwDqTyQG0AKVviBQp09T3OrY1X3tHNyrJCbqJfY= +github.com/gokrazy/kernel.amd64 v0.0.0-20260705070735-de680abf072b/go.mod h1:bcNzFtcy9x+l7l4KUqOkVFyIqrtWn8U92Jo9ZEOckbw= +github.com/gokrazy/kernel.arm64 v0.0.0-20260705071517-37841c4d6ff1 h1:MYq3OcTlEz46i/DZxG3c6ePjE6Te/024cPW2VHTBVAs= +github.com/gokrazy/kernel.arm64 v0.0.0-20260705071517-37841c4d6ff1/go.mod h1:WWx72LXHEesuJxbopusRfSoKJQ6ffdwkT0DZditdrLo= github.com/gokrazy/kernel.rpi v0.0.0-20251127164438-9778ec0261de h1:RSLWj1Ska9s4cl+n/bC5LY4s8vLr+tZoO2vMm/wGP64= github.com/gokrazy/kernel.rpi v0.0.0-20251127164438-9778ec0261de/go.mod h1:p5uBeUWKZVv3KJWWD6s9MpAjPjGJUe2CmKDML+5pm6U= github.com/gokrazy/rpi-eeprom v0.0.0-20260518070910-95f7328a8228 h1:sLyorzF3zTdEiTvTUpctCIf14tZQFXTfayWBhn9QPG4= @@ -1193,8 +1195,6 @@ github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55 h1:Gzfnfk2TWrk8 github.com/tailscale/go-winio v0.0.0-20231025203758-c4f33415bf55/go.mod h1:4k4QO+dQ3R5FofL+SanAUZe+/QfeK0+OIuwDIRu2vSg= github.com/tailscale/goexpect v0.0.0-20210902213824-6e8c725cea41 h1:/V2rCMMWcsjYaYO2MeovLw+ClP63OtXgCF2Y1eb8+Ns= github.com/tailscale/goexpect v0.0.0-20210902213824-6e8c725cea41/go.mod h1:/roCdA6gg6lQyw/Oz6gIIGu3ggJKYhF+WC/AQReE5XQ= -github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e h1:tyUUgeRPGHjCZWycRnhdx8Lx9DRkjl3WsVUxYMrVBOw= -github.com/tailscale/gokrazy-kernel v0.0.0-20240728225134-3d23beabda2e/go.mod h1:7Mth+m9bq2IHusSsexMNyupHWPL8RxwOuSvBlSGtgDY= github.com/tailscale/golang-x-crypto v0.0.0-20250404221719-a5573b049869 h1:SRL6irQkKGQKKLzvQP/ke/2ZuB7Py5+XuqtOgSj+iMM= github.com/tailscale/golang-x-crypto v0.0.0-20250404221719-a5573b049869/go.mod h1:ikbF+YT089eInTp9f2vmvy4+ZVnW5hzX1q2WknxSprQ= github.com/tailscale/hujson v0.0.0-20260302212456-ecc657c15afd h1:Rf9uhF1+VJ7ZHqxrG8pJ6YacmHvVCmByDmGbAWCc/gA= diff --git a/gokrazy/gokrazy_test.go b/gokrazy/gokrazy_test.go index aa52ea2f6..266c1309d 100644 --- a/gokrazy/gokrazy_test.go +++ b/gokrazy/gokrazy_test.go @@ -37,8 +37,8 @@ func TestTsappConfigs(t *testing.T) { name: "tsapp", app: "tsapp", goarch: "amd64", - kernel: "github.com/tailscale/gokrazy-kernel", - firmware: "github.com/tailscale/gokrazy-kernel", + kernel: "github.com/gokrazy/kernel.amd64", + firmware: "github.com/gokrazy/kernel.amd64", }, { name: "tsapp-vm-arm64", @@ -117,11 +117,11 @@ func findKernelPath(t *testing.T) string { t.Fatalf("go env GOMODCACHE: %v", err) } for _, r := range mf.Require { - if r.Mod.Path == "github.com/tailscale/gokrazy-kernel" { + if r.Mod.Path == "github.com/gokrazy/kernel.amd64" { return strings.TrimSpace(string(goModB)) + "/" + r.Mod.String() + "/vmlinuz" } } - t.Fatal("failed to find gokrazy-kernel in go.mod") + t.Fatal("failed to find kernel.amd64 in go.mod") return "" } diff --git a/gokrazy/natlabapp/config.json b/gokrazy/natlabapp/config.json index c46f01879..561d03585 100644 --- a/gokrazy/natlabapp/config.json +++ b/gokrazy/natlabapp/config.json @@ -24,7 +24,7 @@ "GOOS=linux", "GOARCH=amd64" ], - "KernelPackage": "github.com/tailscale/gokrazy-kernel", + "KernelPackage": "github.com/gokrazy/kernel.amd64", "FirmwarePackage": "", "EEPROMPackage": "", "InternalCompatibilityFlags": { diff --git a/gokrazy/natlabapp/gokrazydeps.go b/gokrazy/natlabapp/gokrazydeps.go index 2e4c1361c..9939149ca 100644 --- a/gokrazy/natlabapp/gokrazydeps.go +++ b/gokrazy/natlabapp/gokrazydeps.go @@ -7,8 +7,8 @@ package gokrazydeps import ( _ "github.com/gokrazy/gokrazy/cmd/dhcp" + _ "github.com/gokrazy/kernel.amd64" _ "github.com/gokrazy/serial-busybox" - _ "github.com/tailscale/gokrazy-kernel" _ "github.com/tailscale/ts-gokrazy/gokrazyinit" _ "tailscale.com/cmd/tailscale" _ "tailscale.com/cmd/tailscaled" diff --git a/gokrazy/tsapp/config.json b/gokrazy/tsapp/config.json index 8094180fa..10825b3c5 100644 --- a/gokrazy/tsapp/config.json +++ b/gokrazy/tsapp/config.json @@ -44,8 +44,8 @@ "GOOS=linux", "GOARCH=amd64" ], - "KernelPackage": "github.com/tailscale/gokrazy-kernel", - "FirmwarePackage": "github.com/tailscale/gokrazy-kernel", + "KernelPackage": "github.com/gokrazy/kernel.amd64", + "FirmwarePackage": "github.com/gokrazy/kernel.amd64", "InternalCompatibilityFlags": { "InitImportPath": "github.com/tailscale/ts-gokrazy/gokrazyinit" } diff --git a/gokrazy/tsapp/gokrazydeps.go b/gokrazy/tsapp/gokrazydeps.go index bee05729d..60935b24f 100644 --- a/gokrazy/tsapp/gokrazydeps.go +++ b/gokrazy/tsapp/gokrazydeps.go @@ -11,8 +11,8 @@ import ( _ "github.com/gokrazy/gokrazy/cmd/dhcp" _ "github.com/gokrazy/gokrazy/cmd/ntp" _ "github.com/gokrazy/gokrazy/cmd/randomd" + _ "github.com/gokrazy/kernel.amd64" _ "github.com/gokrazy/serial-busybox" - _ "github.com/tailscale/gokrazy-kernel" _ "github.com/tailscale/ts-gokrazy/gokrazyinit" _ "tailscale.com/cmd/tailscale" _ "tailscale.com/cmd/tailscaled" diff --git a/shell.nix b/shell.nix index 0e373bbca..8de419bba 100644 --- a/shell.nix +++ b/shell.nix @@ -16,4 +16,4 @@ ) { src = ./.; }).shellNix -# nix-direnv cache busting line: sha256-48z3snHndd96fJtvNbK+fnzTs4W6VfrWxL1l8HXRAQI= +# nix-direnv cache busting line: sha256-y7ZgrxWeeUYG+FKL9Ym8QmqaQsGnUVc9GXkA4na/AJI= diff --git a/tstest/integration/nat/nat_test.go b/tstest/integration/nat/nat_test.go index e3e53374c..520d1f093 100644 --- a/tstest/integration/nat/nat_test.go +++ b/tstest/integration/nat/nat_test.go @@ -106,7 +106,7 @@ func findKernelPath(goMod string) (string, error) { return "", err } for _, r := range mf.Require { - if r.Mod.Path == "github.com/tailscale/gokrazy-kernel" { + if r.Mod.Path == "github.com/gokrazy/kernel.amd64" { return strings.TrimSpace(string(goModB)) + "/" + r.Mod.String() + "/vmlinuz", nil } } diff --git a/tstest/natlab/vmtest/vmtest.go b/tstest/natlab/vmtest/vmtest.go index 33ee91782..f17639b8d 100644 --- a/tstest/natlab/vmtest/vmtest.go +++ b/tstest/natlab/vmtest/vmtest.go @@ -2071,17 +2071,17 @@ func findKernelPath(goMod string) (string, error) { } goModCache := strings.TrimSpace(string(goModCacheB)) - // Parse go.mod to find gokrazy-kernel version. + // Parse go.mod to find kernel version. for line := range strings.SplitSeq(string(b), "\n") { line = strings.TrimSpace(line) - if strings.HasPrefix(line, "github.com/tailscale/gokrazy-kernel") { + if strings.HasPrefix(line, "github.com/gokrazy/kernel.amd64") { parts := strings.Fields(line) if len(parts) >= 2 { return filepath.Join(goModCache, parts[0]+"@"+parts[1], "vmlinuz"), nil } } } - return "", fmt.Errorf("gokrazy-kernel not found in %s", goMod) + return "", fmt.Errorf("kernel.amd64 not found in %s", goMod) } // PingRoute describes what connection type was used to transfer a Disco ping.