Elyse Betters Picaro / ZDNET
ZDNET's key takeaways
Linux kernel developers are already using AI.
AI helps Linux programmers, but they're careful how they use it.
Linux kernel maintainers must decide key AI policy issues.
Get more in-depth ZDNET: Add us as a preferred Google source on Chrome and Chromium browsers.
Microsoft CEO Satya Nadella has suggested as much as 30% of the company's code is now written by AI. While Microsoft may love AI code-writing tools, open-source and Linux developers are much more wary.
As far as Daniel Stenberg, chief maintainer of the popular open-source cURL data transfer program, is concerned, AI-written bug reports are active attacks on the project. The Linux kernel community stands between these two extremes.
Also: This is the fastest local AI I've tried, and it's not even close - how to get it
In a speech at the 2025 Open Source Summit, North America, Sasha Levin, Linux kernel hacker and Nvidia distinguished engineer, said AI isn't going to replace programmers.
Instead, he said:
Large language models (LLMs) are just another fancy compiler. Back in the 50s and 60s, everyone was working in Assembly, and then C showed up, and we didn't stop coding in Assembly because C was suddenly perfect. C isn't perfect, but we stopped doing it because C is good enough, and we're more productive coding in C. And to me, LLMs are a very similar trade-off. They're not perfect yet, but at some point they will be good enough to make us more productive.
That's not to say AI isn't already useful. Levin cited an example of a tiny upstream patch to git-resolve in the 6.16 Linux kernel. This tool resolves incomplete or incorrect commit IDs, a small but annoying issue for top maintainers. Levin used AI to write the entire routine: "The only thing I did there was to review the code and actually test it to make sure it works."
Also: My go-to LLM tool just dropped a super simple Mac and PC app for local AI - why you should try it
However, before you get too excited, he warned: "This is a great example of what LLMs are doing right now. You give it a small, well-defined task, and it goes and does it. And you notice that this patch isn't, 'Hey, LLM, go write me a driver for my new hardware.' Instead, it's very specific -- convert this specific hash to use our standard API."
Levin said another AI win is that "for those of us who are not native English speakers, it also helps with writing a good commit message. It is a common issue in the kernel world where sometimes writing the commit message can be more difficult than actually writing the code change, and it definitely helps there with language barriers."
LLMs could be good Linux maintainer helpers
Looking ahead, Levin suggested LLMs could be trained to become good Linux maintainer helpers: "We can teach AI about kernel-specific patterns. We show examples from our codebase of how things are done. It also means that by grounding it into our kernel code base, we can make AI explain every decision, and we can trace it to historical examples."
In addition, he said the LLMs can be connected directly to the Linux kernel Git tree, so "AI can go ahead and try and learn things about the Git repo all on its own."
Also: Here's how I finally cracked a tricky Linux problem with this AI terminal app
Then, armed with this information, a Linux-savvy LLM might be able to help with tedious jobs, such as backporting patches to the kernel's stable branches: "The scale of the kernel is quite large, and, if you look at the raw numbers, to perform backports efficiently, the stable maintainer would need to review hundreds of patches every day, including weekends and holidays. There are no breaks to find about five to 10 commits that need to be backported every day. It's a very tedious and frustrating process."
How Linux kernel developers are using AI now
That's where the latest version of the Linux kernel tool AUTOSEL comes in. This AI-enabled program automatically analyzes Linux kernel commits to determine whether they should be backported to stable kernel trees. The tool examines commit messages, code changes, and historical backporting patterns to make intelligent recommendations.
Also: 10 open-source apps I recommend every Windows user download - for free
James Bottomley, senior Linux kernel maintainer and IBM Research distinguished engineer, explained why this approach is a good use for AI in a Linux Kernel Mailing List (LKML) message: "If you think about it, the git history contains the exact patch path between where the patch was applied and where you want to apply it. That's a finite data set which LLMs can be trained to work nicely with."
He continued: "Humans don't look at the patch path (or use something broad like a range scan). The AI can be patient enough to actually go over it all."
Moreover, AUTOSEL is now being used to spot code changes that address Linux Common Vulnerabilities and Exposures (CVE) security holes. Since in Linux almost any bug can be a security vulnerability, tracking these commits can be heavy work. To follow these commits, the kernel maintainers had been using numerous "hacky Bash scripts." Now, LLMs are utilizing Retrieval Augmented Generation (RAG) to retrieve the kernel's Git repositories and documentation, learn the patches' history, and reduce hallucinations.
Also: Want to save your old computer? Try one of these 8 Linux distros for free
That's not the only way Linux kernel developers are using AI. Linux Foundation fellow Shuah Khan told me that "AI-based tools are now being used to examine commit messages, code changes, and historical backporting patterns to make intelligent recommendations."
Linux kernel developers are also wary of AI, Verizon executive director Dirk Hohndel told ZDNET:
I believe that many of these tools can be very useful in augmenting what a human developer can do. They can simplify routine tasks. They can make you faster when typing. They can help document code. But especially with a language like C and with an exceptionally complex codebase like the Linux kernel, I believe we are still at the very edge of what these tools are good at.
However, he also said: "Developers should mark a patch that had code input (and not just text-completion) from an LLM, simply so that reviewers are aware of this and can adjust their process and scrutiny accordingly. Because I do believe that these patches deserve a lot more scrutiny than those sent in by experienced human developers."
Hohndel is far from alone. As Lorenzo Stoakes, a Linux maintainer and Oracle engineer, warned on the LKML: "The kernel is uniquely sensitive to erroneous (especially subtly erroneous) code -- even small errors can be highly consequential. We use a programming language that can almost be defined by its lack of any kind of safety, and, in some subsystem patches, are simply taken if no obvious problems exist, making us rather vulnerable to this."
An official kernel AI policy is needed
So, it is that Jiří Kosina, lead Linux developer at SUSE, has proposed on the LKML that kernel developers must settle on a way to mark which LLM has generated what code and who takes responsibility for that patch.
Also: Google reveals how much energy a Gemini query uses - in industry first
The maintainers agree that Linux needs an official policy for addressing these issues. Steven Rostedt, a senior Linux kernel developer and Google software engineer, is working on the first draft of an official kernel AI policy document. This draft will be presented at the Linux Plumbers Conference later this year.
There's another aspect to this transition as well, besides how well, or not, an AI can write code: the copyright status of AI-produced code. As Levin said in a proposal, "The Linux kernel is licensed under GPL-2.0 only with a syscall exception. Coding agents MUST follow this licensing rule with no exceptions. Any code contributed must be compatible with this license." That's far easier said than done, since the copyright status of AI-derived code remains an open question.
Also: Excel's new Copilot function turns your prompts into formulas - how to try it
Finally, AI has made it painfully easy for people without a clue to push AI slop patches to developers. As kernel stable maintainer Greg Kroah-Hartman suggested: "I will note that we are already getting this kind of 'slop' today, with the numbers going up on a weekly basis." Maintainers are already overworked. They don't need clueless patches adding pointless work to their load.
AI is coming to the Linux kernel; everyone agrees on that. AI will certainly help in some ways. It's going to be a pain in other ways. Exactly how AI will fit remains to be seen. Stay tuned.