Linus Torvalds "Did What I Preach", Used AI To Make Code Decipherable & Uncovered More Bugs

After using Claude Code to draft code to help make a fundamental improvement to the Linux kernel, Linux creator Linus Torvalds continued using AI this weekend and talking up its benefits. Beyond generating initial patches and a test program for that noted I/O enhancement, he separately talked up using AI/LLMs for making patches more decipherable to understand in the process the AI noted more long-standing bugs within the Linux kernel. With the delayed Linux 7.3-rc7 release, in addition to that "noref-filemap-read-with-llm" Git branch that appeared within Linus Torvalds' source tree, an "assoc-array-fixes" Git tag also appeared there on Sunday. Linus explained in that Git tag message that he "did what I preach" and used modern LLM tools to make sense of patches that were hard for him to follow. LLMs were used to confirm the original bug in question as well as having found three other bugs that existed in the code for more than the past decade. Linus Torvalds wrote in the assoc-array-fixes Git tag: "Nils Ollrogge reported a bug in the assoc_array library and had a patch to fix it too, but that code was too obscure for me to follow, so I did what I preach: use modern LLM tools to help make sense of it all. So this is an LLM-assisted branch which makes the code more readable by splitting up some of the larger and hard-to-read functions. The code was then run through a test harness in user space, which not only confirmed the bug Nils reported, but found three other bugs too - all going back to the very first commit adding this library back in 2013." The Linux assoc_array code is used for the kernel's associative array implementation. The patches haven't yet been merged to the master branch but presumably will be punted off for the upcoming Linux 7.4 merge window. Linus Torvalds is continuing to be more vocal about his AI/LLM usage and promoting its benefits as a tool for Linux kernel development.

Original Source

Read the full article at Phoronix →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.