Linus Torvalds says he used AI tools to untangle obscure Linux kernel code, which confirmed one reported bug and found three more dating to 2013
Linus Torvalds "Did What I Preach", Used AI To Make Code Decipherable & Uncovered More Bugs Follow on from yesterday.... More AI use on the Linux kernel by Linus Torvalds this weekend.
Context
The creator of Linux openly using LLMs on kernel code signals that AI assistance is becoming accepted in one of the most demanding open source projects.
Phoronix is reporting on a Git tag message Torvalds wrote, so the quotes are his own words. It follows an earlier Phoronix report that Torvalds used Claude Code to draft a separate kernel improvement. The patches had not yet been merged to the main branch when Phoronix wrote.
Deep dive
On October 12, Phoronix posted: Linus Torvalds "Did What I Preach", Used AI To Make Code Decipherable & Uncovered More Bugs, noting it was more AI use on the Linux kernel by Torvalds that weekend.
According to Phoronix, an assoc array fixes tag appeared in Torvalds' source tree on Sunday alongside the delayed Linux 7.3 rc7 release. In the tag message, Torvalds wrote that Nils Ollrogge reported a bug in the assoc_array library and had a patch to fix it, but that the code was too obscure for him to follow, so he did what he preaches and used modern LLM tools to help make sense of it all.
Torvalds wrote that the result is an LLM assisted branch that makes the code more readable by splitting up some larger, hard to read functions. He said the code was then run through a test harness in user space, which confirmed the reported bug and found three other bugs too, all going back to the first commit adding the library in 2013. The assoc_array code is the kernel's associative array implementation.
Phoronix said the patches will presumably go into the Linux 7.4 merge window, and that Torvalds has been increasingly vocal about the benefits of AI as a tool for kernel development.
What to expect next
Watch whether the assoc array fixes land in the Linux 7.4 merge window, and whether other maintainers follow Torvalds in using LLMs to refactor and test older kernel code.
Also watch the kernel community's proposal, reported by Phoronix, to drop the requirement for an assisted by tag on AI generated contributions, and how it balances disclosure with wider AI use.
