Hacker News new | ask | show | jobs
by TacticalCoder 1 day ago
> Linux 7.1 is also notable for its code removals. Driven by AI-assisted bug reporting, ISDN and other old network driver code was removed to avoid that influx of bug reporting against those very rarely touched or used drivers for obsolete hardware.

Moving really old and unused code out of the kernel just to get less AI-assisted bug reports is IMO one of the best consequence ever of AI.

I love it.

We should start trimming the fat out of everything.

8 comments

This is the sort of thinking that had organizations buying all new desktops because the perfectly working ones they had won't run Windows 11.

I have 10 year old servers I'm still using because they run fine with linux.

The old unmaintained ISDN hardware for which the code has been removed is likely 20 years old, or so. The perfectly good laptops are usually 3-4 times younger.
FreeBSD and NetBSD aren't going anywhere and can be used for older hardware, for the amount of production and load bearing use Linux sees there's an enormous amount of cruft and garbage in it.
That's good for your personal computing, but a renewing forest fire is good for all sorts of organizations. And species. It's a very good algorithm to run.

It's naturally de-ossifying and forces uptake of new methods and practices.

It gives you an opportunity to question assumptions and do things greenfield again.

>We should start trimming the fat out of everything.

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupéry

One of my buddies was infamous for a while for being the "I deleted X lines of code today" guy.

I remember working with a guy who apparently deleted more code than he added in his time at the company. I think it said more about the codebase than anything but it was good that someone was trying to make it better.
Funnily, I have been that guy at the last 3 places I've worked at. Every place has some amount of cruft code, and I love sniffing it out and deleting it.
>"Perfection is achieved..."

I, too, am a fan of RFC 1925.

I’ve tried to submit code that removed old drivers from the kernel build in some distros, and they were universally rejected.

Everyone is afraid of breaking users until Torvalds says it’s ok.

> Moving really old and unused code out of the kernel just to get less AI-assisted bug reports

Obviously, the parent is /s, but when I read this, I thought Linux was removing exploit paths that exercise rarely-used features.

On phone OSes at least, quirky rare formats and features are (were?) a common source of exploitable bugs.

Is the parent really being sarcastic? I read it as genuine.

There’s presumably plenty of code bloat in the kernel, and while no human would ever scan for bugs in a corner of the kernel that hasn’t been used or touched in decades, AI 100% will. And while those bug reports might be useless as bug reports, they seem promising as “why is this code even here?” flags.

I don't mean to be harsh, but if there's a codepath that is exercised on your hardware, but not on mine, I don't think it would be fair for me to deem it as "bloat". There are a TON of supported devices and use cases that are not my own, but are essential to someone else.
If you are still using ISDN you could maintain a fork.

This is one of the main examples of drivers that were removed.

Sure, sure. I’m not arguing for removing drivers for uncommon devices, or even rare devices. But there’s a line somewhere. Maybe it’s at “devices that no longer exist.” But I think it’s somewhere before that. And I have no idea how you’d figure out which devices fall where around this hypothetical line. I can only hope that they had good justification for these removals.
Maybe that points to an architecture issue? Is kernel driver support general enough to support all hardware in theory? If so it should be on hardware to provide a compatible api IMO. Note: I really have no experience in any of this there is probably more important things to consider like security/control or something.
Exploit paths in unloaded modules, I guess.
> very rarely touched or used drivers for obsolete hardware

I guess end users can not upgrade but a definition of obsolete would be nice.

To me, every HP printer ever is obsolete. But I assume someone else has an equally valid and different opinion. How does that go with computer hardware?

Chesterton's Fence...
Chesterton's Fence only says to learn why the fence was erected, it gives no other guidance on what to do after that. There isn't too much mystery in why a device driver was made, so Chesterton's Fence yields next to nothing here.
The ground strap on a device is only used temporarily, too
It's ok, you can let go of Chesterton's ISDN phone pole now. Come, we have cable, we have fiber. Just for you, I'll even fire up a little hotspot from the palm of my hand as we walk away.
Code is liability. AI just made it harder to ignore.
How about we stop adding the fat in the first place. cough. electron. cough.
Presumably that old code was actually useful at the time it was added. It might not be used now, but it helped someone back then. One of the great things about early Linux was that it tried to run on every piece of hardware available. If Linus only wrote drivers (or allowed others to submit drivers) that worked on his personal computer, Linux would have never flourished this far.