CyberSecurityNews

Linus Torvalds Reveals Claude Code Wrote Linux Kernel Patches and Test Programs


Linus Torvalds has disclosed that Claude Code helped write Linux kernel patches, test programs, review material, and the first draft of a technical write-up under his direction.

The work targets page-cache read performance, showing how AI coding tools are used in core operating-system development while openly documenting technical limits.

Torvalds states that Claude Code produced the material under his guidance. He separately notes that measurements ran on his machine.

The disclosure describes a supervised development effort, not an AI system independently maintaining Linux. The eight-patch series addresses a bottleneck when many threads perform small reads from the same cached file.

Each read normally updates a folio reference count. A folio represents a group of memory pages, and repeated updates force processor cores to compete over shared data.

The proposed approach delays reusing removed page-cache memory until an RCU grace period ends. This gives active readers time to finish before another purpose can use that memory.

With that protection, the new read path can copy cached data without taking and dropping folio references. When conditions prevent the faster route, including missing cached data or a user-buffer fault, the existing read path continues the operation.

Linus Torvalds Reveals Claude Code Wrote Linux Patches

In the October 10 commit message, Torvalds reported that eight threads on his four-core, eight-thread Intel laptop achieved roughly 30–33 million 16-byte reads per second from a cached file, compared with 9.9–10.4 million in the baseline.

Those results apply to a narrow benchmark, not overall Linux performance. Testing used ext4, with processor security mitigations and CONFIG_HARDENED_USERCOPY disabled. We didn’t measure a larger machine, and some reads involving missing user-memory pages became slower.

Memory pressure remains a major concern. Delayed frees can leave substantial memory waiting for reuse without the allocator properly accounting for it. Later patches reduced that backlog, but the write-up still lists unresolved allocation problems and no firm bound when grace periods run slowly.

One test checked for incorrect data during repeated page eviction and reuse. Normal runs reported no bad reads, while a deliberately broken version returned wrong bytes, including data from other users of freed memory.

Testing remained limited. We did not cover KASAN, lockdep, hardened usercopy, other architectures, or several stress cases.

The disclosure complements coverage of Claude Code Security and AI-led Linux kernel bug research. AI can support development and investigation, but these patches still need broader testing and review before real workloads can validate their performance gains and memory-safety claims.

Update defenses against new malware as soon as it appears. Integrate TI Feeds with data from 16K SOCs.



Source link