Linus Torvalds Reveals Claude Code Wrote Linux Kernel Patches and Test Programs
Linus Torvalds says Claude Code drafted supervised Linux patches that speed cached small reads.
Linus Torvalds said Claude Code, under his direction, helped draft an eight-patch Linux kernel series, tests, review notes, and a technical write-up for page-cache read performance. On his four-core Intel laptop, eight threads reached roughly 30–33 million 16-byte cached reads per second versus 9.9–10.4 million at baseline, using ext4 with some hardening disabled. The change waits for an RCU grace period before reusing removed page-cache memory so readers can copy data without folio reference updates. He said the benchmark is narrow, memory accounting under pressure remains unresolved, and broader review is still required.
- Eight patches reduce folio-reference contention on small cached-file reads.
- Laptop benchmark rose from about 10 million to 30–33 million reads per second.
- Delayed page-cache reuse can leave memory unaccounted under pressure.
- KASAN, lockdep, other architectures, and several stress cases were not tested.
Full article454 words · extracted from cybersecuritynews.com · click to collapse
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.
Abinayahttps://cybersecuritynews.com/
Abi is a Security Editor and fellow reporter with Cyber Security News. She is covering various cyber security incidents happening in the Cyber Space.