feat(build): upgrade kernel from 6.12.95 to 6.18.38 - #12
Conversation
6.18 is the current LTS (EOL Dec 2028, same as 6.12) and carries the btrfs/EROFS/virtiofs performance work from 6.13-6.18. Config migration, verified by resolving both fragments through olddefconfig on real 6.12.95 and 6.18.38 sources and diffing every symbol's disposition: - Legacy iptables gates: 6.18 moved ip_tables/ip6_tables behind NETFILTER_XTABLES_LEGACY + IP_NF_IPTABLES_LEGACY + IP6_NF_IPTABLES_LEGACY. Without them every IP_NF_*/IP6_NF_* table silently resolves away and dockerd in the guest (static iptables-legacy) loses filter/nat. Added all three gates. - LIBCRC32C: removed upstream in 6.15 (folded into the CRC32 lib); dropped from both fragments. The post-olddefconfig assertion now checks a symbol list including IP_NF_NAT/IP6_NF_NAT, which transitively cover the whole legacy xtables chain, so the next silent dependency-gate change fails the build instead of shipping a kernel without iptables. The out-of-tree vsock rx-budget patch applies cleanly on 6.18.38.
cdn.kernel.org intermittently resets connections mid-transfer; a truncated tarball previously failed the build with a confusing xz error.
The flag was removed upstream in 6.13; request merging is now unconditional, so tag_set.flags stays zeroed.
Greptile SummaryThis PR upgrades the default ArcBox kernel build to Linux 6.18.38. The main changes are:
Confidence Score: 5/5Safe to merge with minimal risk. The changes are focused on the kernel version bump and compatibility migration. The updated assertions catch the key resolved config symbols after No files require special attention.
What T-Rex did
Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User as Builder/CI
participant Script as scripts/build-kernel.sh
participant Kernel as Linux 6.18.38 source
participant Config as arcbox-<arch>.config
participant Assert as post-olddefconfig checks
participant Output as output/kernel-<arch>
User->>Script: Start build with KERNEL_VERSION default 6.18.38
Script->>Kernel: Download source with curl retries
Script->>Kernel: Inject custom drivers and vsock patch
Script->>Config: Copy arch config fragment
Script->>Kernel: make olddefconfig
Kernel-->>Script: Resolved .config
Script->>Assert: Require SquashFS and legacy NAT symbols
Script->>Assert: Require PREEMPT_LAZY when arch supports it
Assert-->>Script: Build may continue
Script->>Kernel: make Image/bzImage
Kernel-->>Output: Kernel artifact
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User as Builder/CI
participant Script as scripts/build-kernel.sh
participant Kernel as Linux 6.18.38 source
participant Config as arcbox-<arch>.config
participant Assert as post-olddefconfig checks
participant Output as output/kernel-<arch>
User->>Script: Start build with KERNEL_VERSION default 6.18.38
Script->>Kernel: Download source with curl retries
Script->>Kernel: Inject custom drivers and vsock patch
Script->>Config: Copy arch config fragment
Script->>Kernel: make olddefconfig
Kernel-->>Script: Resolved .config
Script->>Assert: Require SquashFS and legacy NAT symbols
Script->>Assert: Require PREEMPT_LAZY when arch supports it
Assert-->>Script: Build may continue
Script->>Kernel: make Image/bzImage
Kernel-->>Output: Kernel artifact
Reviews (4): Last reviewed commit: "fix(build): assert PREEMPT_LAZY only whe..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bf8704cd4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
6.18 unlocks PREEMPT_LAZY on arm64 (arch selects ARCH_HAS_PREEMPT_LAZY); it keeps throughput close to voluntary while cutting worst-case scheduling latency for interactive guest work — container exec, port-forward first byte. This is the headline arm64 win the version bump exists to reach, so it ships with it rather than as a later release. Also forward-compatible: 7.0 removes the voluntary model for lazy-capable arches, so olddefconfig would otherwise silently fall back. Both fragments now pin PREEMPT_LAZY=y and the post-olddefconfig assertion gained CONFIG_PREEMPT_LAZY, so a future arch/Kconfig change that drops it fails the build instead of shipping a NONE-preempt kernel.
The earlier commit removed the flag outright to fix the 6.18 build, but a KERNEL_VERSION=6.12/6.13 override rebuild of arcbox_hvc_blk still needs it: pre-6.14 the tag set must opt into blk-mq bio merging, and without it the driver issues every small bio separately (throughput regression). The flag is an enum member (not a macro), so an #ifdef guard can never see it — use a LINUX_VERSION_CODE guard. Removal boundary verified from source: present in v6.13, gone in v6.14 (the earlier message's '6.13+' was off by one). On 6.14+ the block is compiled out, so the default 6.18 build is unchanged.
The unconditional CONFIG_PREEMPT_LAZY assertion broke the documented KERNEL_VERSION override for older kernels (the symbol needs arch wiring: x86 6.13+, arm64 6.16+) — the exact bisect workflow the previous commit version-guarded the driver for. Gate the assertion on the resolved CONFIG_ARCH_HAS_PREEMPT_LAZY capability bit instead of version arithmetic, and warn when the preemption choice falls back to its kconfig default on such builds.
Summary
Moves the default kernel from 6.12.95 to 6.18.38, the current LTS (EOL Dec 2028, same horizon as 6.12) — picking up the btrfs, EROFS, and virtiofs performance work from 6.13–6.18.
Config migration (audited, not guessed)
Both config fragments were resolved through
olddefconfigagainst real 6.12.95 and 6.18.38 sources, and every symbol's disposition was diffed between the two. Excluding noise identical on both versions, exactly two regressions surfaced, both fixed:ip_tables/ip6_tablesbehind new gate symbols:NETFILTER_XTABLES_LEGACY→IP_NF_IPTABLES_LEGACY/IP6_NF_IPTABLES_LEGACY. Without them, everyIP_NF_*/IP6_NF_*table silently resolves away — and the guest rootfs ships a static iptables-legacy (xtables-legacy-multi), so dockerd would lose filter/nat entirely. All three gates added to both fragments.LIBCRC32Cwas removed upstream in 6.15 (folded into the CRC32 lib); dropped from both fragments.The post-
olddefconfigassertion is now a symbol list includingIP_NF_NAT/IP6_NF_NAT, which transitively cover the whole legacy xtables chain — the next silent dependency-gate change fails the build instead of shipping a kernel without iptables.Code changes
arcbox_hvc_blk: droppedBLK_MQ_F_SHOULD_MERGE(removed upstream in 6.13; merging is now unconditional). Sole compile failure on 6.18.virtio_transport_rx_workstructure (out:label,virtio_vsock_rx_fill) is unchanged. Comment updated.Verification
Follow-ups (pre-existing, out of scope)
BRIDGE_VLAN_FILTERING=yhas never actually resolved (missingVLAN_8021Qdependency) — on 6.12 too.ebtablesbutBRIDGE_NF_EBTABLESwas never enabled in the fragments (also needs the legacy gate on 6.18+).