|
|
Log in / Subscribe / Register

Static analyzers

Static analyzers

Posted Oct 10, 2026 2:42 UTC (Sat) by mathstuf (subscriber, #69389)
In reply to: Static analyzers by mvollrath
Parent article: Coping with the onslaught of kernel security bugs

Now we have tools that multiply our time, and in my experience, also multiply learning rate. As of September, it's gotten to the point where I'd be kind of pissed if it went away. I'm still banking on human knowledge being valuable, but the act of typing code into an editor has never been the interesting part of the craft. The best programming language is one you read and write natively.

I've found a few things:

  • For utilities that only I'll use or are only a means to an end: sure, slop is fine. Example: a TUI to help manage GitLab's issue boards because the web is clunky with label management. It is purely a means-to-an-end that makes many assumptions about the project at hand.
  • For small things that are "Vim macro-able" or sed-able: just do it; explaining it is probably not worth it (though one's editor proficiency may move this line around wildly). ast-grep can raise the bar significantly (though LLM assistance to write the ast-grep rules may be useful). Many times, tools can do these things (e.g., cargo update --breaking can update Cargo.toml for you)
  • For "active development" where design is being done on-the-fly, the typing of the code gives me space to think about the design and seeing it unfold helps to clarify things. For example, after refactoring some LLM-assisted code recently, I found even more improvements and use cases that I wouldn't have without adding another feature utilizing many of the same codepaths. This original MR (see older revisions to see unreviewed patterns, particularly this diff) with this refactor leading to this feature further factored out into a dependent crate so that a long-requested feature boils down to this code. There's <details> migration here as well that really should be a separate MR that I've not separated out yet. I'm not good enough at prompting to get this kind of leverage out of LLMs quicker than I can discover it while typing.
  • The sweet spot seems to be, for me, a "motivation bridge" where I know how something should be done in my head, but the activation energy is just too high. This seems to be the land of "good third to fifth issue" bugs and features (I definitely don't think LLMs belong in the "good first issue" field for long-lived projects because their value lies in being an onramp for humans).


to post comments

Static analyzers

Posted Oct 11, 2026 20:32 UTC (Sun) by mvollrath (subscriber, #183387) [Link]

For "active development" where design is being done on-the-fly, the typing of the code gives me space to think about the design and seeing it unfold helps to clarify things. For example, after refactoring some LLM-assisted code recently, I found even more improvements and use cases that I wouldn't have without adding another feature utilizing many of the same codepaths.

I can relate. I write all of the commit messages myself in detail, to prove to myself that I understand what's going on, and in that process I'll often ask the LLM questions and this leads to asking it for revisions. Rewriting (or removing) all generated comment blocks manually has a similar effect, and keeps the typical LLM over-commenting in check.

The sweet spot seems to be, for me, a "motivation bridge" where I know how something should be done in my head, but the activation energy is just too high. This seems to be the land of "good third to fifth issue" bugs and features (I definitely don't think LLMs belong in the "good first issue" field for long-lived projects because their value lies in being an onramp for humans).

For me, it was a motivation bridge to learning about the kernel and how to work on it. If you use it "the way I think you oughtta", spending most of your time asking questions and reading the code it is citing to explain things, you can produce a better first patch even if you never press Send on the generated output. Doing good work still requires time and attention and now the discipline to not just vibe slop it.

Now that I've been working on kernel for about 8 months, and mostly drivers, it's maddening. There are so many bugs and optimizations left on the table. Drivers controlling chips produced in the hundreds of millions lacking attention and modernizations from the past 20 years of kernel development. I have 4 e1000e chips in my house and they're still mapping and unmapping DMA for every frame that comes and goes. Almost every DMA map error path was badly broken at the beginning of this year. Now I'm picking through the bugs so that I can drip feed patches to unify the 3 Rx paths and get it on a page pool without papering over too many issues.

I have a fifth bullet point to add to yours:

  • There's no good reason to accept things being bad or broken.

When any software I use doesn't do what I want it to, it takes very little effort to patch it or even replace it and make the problems go away. An LLM digs up crash dumps, runs debugger against hung processes, isolates where the problem is, and produces a patch or solution in minutes. I could have done that manually, but I would have tried really hard to find another way around or just accepted the jank. A friend vibed out his own Xorg server implemented in Odin and is very happy with it. And why not?

This effect is coming for the kernel and open source. I've been running my own kernel fork for most of this year, and at the current rate it will be late next year before all of the changes are even submitted to mainline. There will be forks. For some, -7 days median time to exploit isn't good enough.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds