|
|
Log in / Subscribe / Register

Static analyzers

Static analyzers

Posted Oct 2, 2026 14:49 UTC (Fri) by kleptog (subscriber, #1183)
In reply to: Static analyzers by mvollrath
Parent article: Coping with the onslaught of kernel security bugs

> Similarly, instead of asking LLMs to find bugs, if we ask LLMs to write discrete tools to find bugs, maybe we decouple some of the sycophantic behavior Greg is talking about by moving the goal.

That only works if you can define a class of bugs that that has something you can test for: locking issues, data races, use-after-free, etc... It doesn't work for the one-off kind of bugs where the code is doing something different to what the specification says. The code is not buggy in an objective sense, only in the sense that it's violating the (often not clearly specified) specification.

New languages can eliminate classes of bugs but the one-offs are much harder. What makes LLMs interesting is that they have learned patterns about what correct code looks like and can recognise when a piece of code almost fits a pattern. And have an idea what kind of pattern violations are likely bugs. One could probably make a specific tool for that kind of thing, I just wonder if it would be any easier to make than training an LLM.


to post comments

Static analyzers

Posted Oct 9, 2026 17:49 UTC (Fri) by raven667 (subscriber, #5198) [Link] (12 responses)

> What makes LLMs interesting is that they have learned patterns about what correct code looks like and can recognise when a piece of code almost fits a pattern. And have an idea what kind of pattern violations are likely bugs. One could probably make a specific tool for that kind of thing, I just wonder if it would be any easier to make than training an LLM.

What I'd be interested in is documenting the techniques and dataset curation needed to train a model just for bug discovery and not code generation, like a fancy grammar checker. That sounds like something which could be created in an ethical way at a fraction of the resource usage such that the cost/benefit ratio is positive. Right now if you weigh the resource cost of model training, the ethical cost of obtaining training datasets, the operational cost, and the cost of bending the entire global economy / supply chain to only making datacenter components, vs the benefits of sloppy code completion, even if the generated code was perfect in very way (its very much not) to me that still wouldn't be worth the cost as we just don't need that much software that quickly, we desperately need to maintain, simplify and cut the software we already have to a sustainable level.

Static analyzers

Posted Oct 9, 2026 19:32 UTC (Fri) by marcH (subscriber, #57642) [Link] (3 responses)

> as we just don't need that much software that quickly, we desperately need to maintain, simplify and cut the software we already have to a sustainable level.

One of the most surprising things for me in this current LLM "revolution" is how much new code people (think they) need. For decades, software engineering was: "code and debugging is expensive, so maximize code re-use" with many different approaches.

But now LLMs seem to be maximizing duplication: copy/paste/diverge on steroids.

Maybe this is fine. Maybe one size does not fit all and maybe we need different "classes" of code for different use cases, including code that no human understands and that is purely maintained by machines. And entirely discarded and replaced once it's grown too complex - just like before LLMs but for a smaller write-off cost.

Maybe the famous "Law of Software Envelopment" just got a new corollary.

Strange times anyway.

Static analyzers

Posted Oct 9, 2026 20:30 UTC (Fri) by mvollrath (subscriber, #183387) [Link] (2 responses)

> But now LLMs seem to be maximizing duplication: copy/paste/diverge on steroids.

> Maybe this is fine. Maybe one size does not fit all and maybe we need different "classes" of code for different use cases, including code that no human understands and that is purely maintained by machines. And entirely discarded and replaced once it's grown too complex - just like before LLMs but for a smaller write-off cost.

My experience has been that SotA LLMs are now very good at making bespoke tools and applications, especially when they're solving a well-understood and well-specified problem.

Why use any existing MQTT broker software when you can have it make, in a weekend or two, a feature complete broker in Rust with complete test coverage, mutations, fuzzing, seccomp, landlock, apparmor, io_uring with op restrictions, the works? And optimized for your use case down to the data structures? And it has 4x the throughput of any other broker? It's an implementation of an open spec, there's nothing particularly interesting to copy from existing implementations. You'd be copying their bugs and "good enough" implementation choices. I've yet to find a free one that doesn't have holes in its spec compliance.

It seems to me like humans are pretty good at deciding what software needs to do, but not great at the making of the software. We fix the bugs that bother us the most and don't bother fixing the rest. We write tests to catch regressions and automate checking the happy path, not to make more work for ourselves, or we don't write tests at all. We only optimize away the biggest hangups and leave so much performance on the table. Writing and analyzing machine code is the realm of experts, and only applied in times of need. We don't gather encyclopedic knowledge of every algorithm and data structure ever invented. Everything hinges on our time being valuable.

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.

Static analyzers

Posted Oct 10, 2026 2:42 UTC (Sat) by mathstuf (subscriber, #69389) [Link] (1 responses)

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).

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.

Static analyzers

Posted Oct 10, 2026 1:40 UTC (Sat) by mathstuf (subscriber, #69389) [Link] (7 responses)

What I'd be interested in is documenting the techniques and dataset curation needed to train a model just for bug discovery and not code generation, like a fancy grammar checker.

I don't know. There was a QotW not too long ago pointing out that the labs were always reporting the numbers of bugs found rather than patches accepted. Of course, when your marketing department has to deal with the difference between "79 bugs found" and "6 patches applied (but not written by our models)", I imagine they're going to prefer to talk about the first number.

I'd certainly prefer that patches come along with such reports, but I've not had the bug firehose pointed in my direction yet either, so perhaps my opinion would change given such a trial.

Static analyzers

Posted Oct 12, 2026 15:57 UTC (Mon) by raven667 (subscriber, #5198) [Link] (6 responses)

What I wonder, not being an expert in the industry of LLMs, is how much better a model could be built for bug detection if there wasn't also pressure to build a generalist coding, do-everything model in an attempt to enclose and rent-seek knowledge work to force a subscription model on it. I feel like the generalist models are worse on specific tasks than a model built and tuned for that task, eg machine language translation had some models which were OK (not great, esp compared to an actual human translator) that had been built and tuned for purpose, but they've been replaced with the general LLM so the translation accuracy has gone down, the model can't really be good at all things at the same time, no matter how much wishful thinking is put into it. I wonder if we could reverse that by focusing on quality rather than breadth, and on resource usage, data curation, instead of whatever it is we are doing now.

Smaller, more specialized models

Posted Oct 13, 2026 0:49 UTC (Tue) by marcH (subscriber, #57642) [Link] (4 responses)

> the model can't really be good at all things at the same time, no matter how much wishful thinking is put into it.

Are there numbers to demonstrate that? It sounds intuitive but you can also imagine that a larger model is a superset of multiple, more specialized ones - hence performing just as well.
Either way, a massive, "one size fits all" model is apparently more "economical" to train (and as you wrote: to make money from) than many more specialized ones. Even if the quality goes down.

The only advantage of more specialized models (assuming they survive...) that seems certain is: RAM size needed for inference. Even more so considering the shortage and crazy prices.

I think I've seen (but not read, sorry) papers on this topic.

Smaller, more specialized models

Posted Oct 13, 2026 11:53 UTC (Tue) by Wol (subscriber, #4433) [Link] (2 responses)

> Are there numbers to demonstrate that? It sounds intuitive but you can also imagine that a larger model is a superset of multiple, more specialized ones - hence performing just as well.

The problem is a larger generalist model is less able to understand the problem. As a simple example, let's pick two languages, BASIC and SQL. Given the huge variety of dialects, a small specialist model will give a much better result. Certainly from what I've heard, people who can train up their models further get excellent results with DataBASIC, while the general models are useless.

(Moi, cynical? But don't forget I don't have any experience of top-end models.)

Cheers,
Wol

Smaller, more specialized models

Posted Oct 13, 2026 15:52 UTC (Tue) by kleptog (subscriber, #1183) [Link]

> The problem is a larger generalist model is less able to understand the problem. As a simple example, let's pick two languages, BASIC and SQL. Given the huge variety of dialects, a small specialist model will give a much better result. Certainly from what I've heard, people who can train up their models further get excellent results with DataBASIC, while the general models are useless.

Isn't that a different issue though? The generalist model training has lots of programming stuff, but not a lot of DataBASIC specifically. So if you take a generalist model and tune it for coding some obscure language it's probable you're going to get better results than from a generalist model alone.

So the model understands your problem just fine, just not the language used to write the result. It's the same as an experienced programmer who has never seen Python before, they can program just fine, they just need specific information about how Python expresses various concepts.

AIUI the trend is to train large general models and then use those to create specialised ones (distilling). The bulk of the models are unchanged, just tweaking the outputs a bit.

Smaller, more specialized models

Posted Oct 13, 2026 15:55 UTC (Tue) by mvollrath (subscriber, #183387) [Link]

Modern LLMs already use a "mixture of experts" architecture. There are specialized "expert" networks and a "router" network to select them. They may have an overall size of hundreds of billions of parameters, but only activate tens of billions per request. This is one reason the frontier models have gotten cheaper. It uses less compute and less energy and produces good results.

For those running local models, MoE is practical because it keeps most of the model in system RAM rather than VRAM, which is usually the constraint when working with found hardware.

Smaller, more specialized models

Posted Oct 16, 2026 23:01 UTC (Fri) by mrugiero (guest, #153040) [Link]

Are there numbers to demonstrate that? It sounds intuitive but you can also imagine that a larger model is a superset of multiple, more specialized ones - hence performing just as well. Either way, a massive, "one size fits all" model is apparently more "economical" to train (and as you wrote: to make money from) than many more specialized ones. Even if the quality goes down.

Not numbers, but my way of thinking about it is:

  1. Sure, it is a superset of all the specialists and technically knows all they know; but
  2. That superset still needs to activate the right neurons for the task; in turn
  3. That means a lot more steering for a model that knows everything than a model that is already biased to a certain task.

See, overfitting is just fitting when you really really want a hammer. That said, I believe it is typically cheaper to do that biasing pass after a pre-training on pretty much everything. If you also need to lower resource usage, you can remove layers afterwards, etc. But doing 100 different pre-trainings sounds like much more waste than a single bigger one. In any case that's an implementation detail.

Static analyzers

Posted Oct 13, 2026 8:17 UTC (Tue) by taladar (subscriber, #68407) [Link]

Finding bugs is a huge part of coding though, this is not really a different task at all.

Static analyzers

Posted Oct 16, 2026 23:05 UTC (Fri) by mrugiero (guest, #153040) [Link]

Fair, but sometimes things look like a one-off bug and end up being a repetitive pattern. See copy-fail and all the similar bugs that were found afterwards. Maybe characterizing copy-fail into a tool detecting the pattern may have been useful.


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