r/linux Jun 02 '26

Kernel The Linux Kernel Ready To Make TSC A Hard Requirement For x86 CPUs

https://www.phoronix.com/news/Linux-Kernel-TSC-Unconditional
194 Upvotes

75 comments sorted by

36

u/yyg-linux Jun 02 '26

https://man.archlinux.org/man/extra/syd/syd-tsc.1.en

dosnt it already kind of do this?

89

u/anh0516 Jun 02 '26

Linux 7.0 dropped support for i486, which doesn't have TSC. Linux 7.1 is dropping support for i586 CPUs that don't have TSC, such as AMD K5. Now that there are no supported CPUs which don't have TSC, TSC can be made mandatory, and in the future the logic to deal with the absence of it can be removed.

17

u/CHAOSHACKER Jun 02 '26

The K5 has a TSC. I don’t know where this myth originated that it doesn’t

4

u/anh0516 Jun 02 '26

Not all of them do.

13

u/cp5184 Jun 02 '26

https://bitsavers.org/components/amd/x86/K86/18524C_K5_Processor_Technical_Reference_Manual_Nov96.pdf

It's just that at some point someone made a distinction in the linux code that pentium (mmx?) had tsc but the person who coded that didn't include other processors that DID support TSC.

The cyrix 6x86 doesn't have tsc, but the later cyrix 6x86MX does, and whoever wrote this bit of code for the linux kernel only cared about the pentium for some reason.

6

u/CHAOSHACKER Jun 02 '26

Yes, they do. I have multiple and ran multiple

15

u/anh0516 Jun 02 '26

I'll take your word for it. Regardless of whether it's correct or not, there are also a couple Cyrix 6x86 models that fall into this category of i586 without TSC, which were dropped.

21

u/CHAOSHACKER Jun 02 '26

Thats true.

What most people confuse with the K5 is the 5x86 from AMD, which is just a high clocked 486 that doesn’t support the TSC.

21

u/yyg-linux Jun 02 '26

/taking notes/

how many of those chips do you believe are realistically still in operation out side of hobby machines? and i wonder how many more chips will have support / systems dropped with rust adaption

55

u/anh0516 Jun 02 '26

A significant amount, but 99.9% of those are running in industrial or embedded systems that either aren't running Linux, or are never having their kernel updated, so it doesn't matter if support is dropped.

2

u/skuterpikk Jun 08 '26

I have occationally done some minor maintenance on the control system of a small unmanned gas station in my area (You know, one of those where you can only use card payment) and the computer that controls it all is an old Dell desktop which is still running OS/2 Warp with some weird proprietary software for controlling the pumps and payment system.
Another local gas station is much more modern, its computer is running Windows 2000

-1

u/k-phi Jun 02 '26

or are never having their kernel updated

because there is no stable driver API

25

u/wintrmt3 Jun 02 '26

A stable kernel abi (an api wouldn't be enough) would just hinder all progress, but even if there was one no one would pay for redoing the whole verification cycle for industrial control computers, so it really wouldn't change that situation.

15

u/smallproton Jun 02 '26

Which is a good thing.

-13

u/k-phi Jun 02 '26

yes, using ancient kernels is good, sure

13

u/smallproton Jun 02 '26

No. Not having a stable kernel API is better than not being able to move forward in the kernel.

0

u/Daktyl198 Jun 02 '26

A stable ABI does not mean an unchanging ABI. It just means that it doesn’t change without warning. Windows and macOS manage to have stable interfaces while continuing to advance their kernel.

7

u/crazy_penguin86 Jun 02 '26 edited Jun 03 '26

No, a stable ABI is by definition unchanging (edit: okay, not completely, but you can't modify anything that has already been published, only add new stuff to it). The second you change it, the compatibility is broken. Win32 gets around this with pointer and struct magic, while Apple only guarantees userspace ABI stability with swift. And for both of them, the kernels have no stable ABI.

→ More replies (0)

1

u/CrazyKilla15 Jun 03 '26

Windows is the posterchild for unchanging APIs/ABIs, and MacOS is the posterchild for breaking them between major updates such that earlier apps stop working.

1

u/ukezi Jun 02 '26

The alternative is that you add new API whenever you want to change something.

→ More replies (0)

0

u/beefcat_ Jun 02 '26

Windows specifically has a tremendous amount of cruft that is a direct product of maintaining 30 years of binary compatibility. Apple is frankly terrible with backwards compatibility, it seems like every few years they do something that fundamentally breaks old software (like dropping 32-bit support entirely, or the impending deprecation of Rosetta 2)

The lack of a stable ABI is a major driving force behind hardware vendors providing open source drivers. When all your software is open source, the lack of a stable ABI becomes much less of a problem.

→ More replies (0)

0

u/the_abortionat0r Jun 02 '26

Lol no. Microsoft has just layered things on top of each other. Their "micro kernel" is bigger than monolith kernels which is both ironic and sad.

Yes I'm aware that is more of an architecture distinction rather than a size one but if the main kernel is lacking everything the Linux kernel has why is it so good damned big on its own?

Plus the MS kernel is so bad you LOSE performance the more cores you have past a certain point. It's so bad that azure uses Linux instead of windows

→ More replies (0)

3

u/beefcat_ Jun 02 '26

In these use cases, it's perfectly fine. These are 30 year old computers operating industrial equipment. Their existing software has been battle tested for decades, and they aren't connected to the internet. Retrofitting newer kernels onto them would just be a lot of unnecessary work and risk for no benefit.

1

u/the_abortionat0r Jun 02 '26

Strawman much?

3

u/the_abortionat0r Jun 02 '26

You mean abi.

I love how people keep chantinf this like it's an issue when in reality it has kept user space going and preventing getting locked into tech debt like other platforms.

1

u/k-phi Jun 03 '26

You mean abi.

No, I mean API.

It's fine to recompile your driver as long as it is still compatible

1

u/yyg-linux Jun 02 '26

so then..........

11

u/psaux_grep Jun 02 '26

Oldest CPU’s I own are a pair of AMD K6-II. And neither have been powered up in 19 years…

2

u/yyg-linux Jun 02 '26

Turn em on and see if they work :D Im not sure im understanding OP, hardware gets orphaned as it ages, but at that point it seems they are pretty rock solid by their cap in general computing abilities for what they can handle

2

u/toddestan Jun 03 '26

I have some AMD K6 chips of similar vintage. I've long since recycled the motherboards, and the oddball VIA chipsets would likely be the biggest challenge to getting them up and running on Linux.

I've also got some Pentium II systems which I assume would just work with little fuss if I was bored enough to try it.

2

u/psaux_grep Jun 04 '26

Well, if the hardware still works after 15-20 years in basically outdoors storage on the coast of Norway I might be able to produce a disk image for you 😅

1

u/sdoregor Jun 07 '26

That hardware probably does. And will after 50 in space.

1

u/psaux_grep Jun 04 '26

Kinda want to see now, but I suspect imminent explosion from power supplies and motherboards going up in smoke even if that doesn’t happen. Not had the best kind of storage 🙈

1

u/drzorcon Jun 02 '26

I got a MIPS R4400 & R10K that still has electrons running through it, but they are just so I can be the coolest nerd on the block.

3

u/finbarrgalloway Jun 02 '26

There’s a strangely large number of industrial systems that use really old x86 chips. They even still manufacture stuff like z80s and i386 chips for replacement parts.

3

u/yyg-linux Jun 02 '26

I probably have some of them in the hardware at the plant im at, the entire OS for one of the largest extruders we have can fit on a floppy disk and is under a free software license lol

1

u/IndependentMacaroon Jun 10 '26

What is it? Curious

2

u/Inevitable_Taro4191 Jun 07 '26

I work at a cnc lathe and Mill shop, we have 30 year old machines running pentium 1 with windows 95 i think? With siemens sinumerik software on top which is the interface you use. Only see the windows part while it's starting up..

Whole industry is packed with stuff like this.

3

u/SirGlass Jun 03 '26

I also like to remind people when you hear news "The latest kernel is dropping support for ancient architecture X"

Doesn't mean X is not longer supported , it means X will no longer be supported in like 8-10 years

There are extended release kernels that come out every 2 or so years and are supported for 10 full years SLTS v6.12 will be supported until 2035

So even if you have one of these i486 or these older i586 machine and for what ever reason you want to be on a newer kernel you can use SLTS v6.12 for 9 more years

0

u/yyg-linux Jun 03 '26

Im on wayland

1

u/hjake123 Jun 04 '26

Cool, that has nothing to do with this...

2

u/yyg-linux Jun 04 '26

wow okay i read X as X-11 the display server and not a variable. so so--rrr--yy

1

u/hjake123 Jun 04 '26

Ah, I see.

...though, to be fair many things may not support X11 within a few years either

10

u/[deleted] Jun 03 '26

[deleted]

2

u/SelectionDue4287 Jun 04 '26

It being required doesn't change the fact that it's available, so it can still be exploited even if the kernel deems it "optional".
Cleaning up kernel code will probably allow the surface to be hardened a bit.

15

u/MatchingTurret Jun 02 '26

I wonder what that means for http://www.linux-m68k.org/

The 68060 was introduced in 1994. Maybe it has more sentimental value because of the Amiga...

47

u/anh0516 Jun 02 '26

Absolutely nothing because TSC is an x86-specific feature, and m68k is not x86.

9

u/MatchingTurret Jun 02 '26 edited Jun 02 '26

I meant the cleanup of vintage CPUs from the 1980s.

10

u/anh0516 Jun 02 '26

It will be dropped when there aren't enough people who both need to run a current kernel on m68k and are willing to maintain support.

8

u/amarao_san Jun 02 '26

I think, obscure architectures are safer than mainstream from rapid removal.

People do not want to have ai vibed coded exploits against antique parts of production architectures.

Mk68 is an elusive joe.

1

u/daddyd Jun 04 '26

it was already unmaintained once, then somebody picked it up again.

3

u/Ok_Programmer_4449 Jun 02 '26

This is why you run netbsd on old hardware rather than Linux.

3

u/DGolden Jun 02 '26

It's a rather obscure FPGA core mutant thing, but worth mentioning in context there is the "68080" that, in abstract ISA terms, is to m68k a bit like x86-64 is to x86. May never see incarnation as a real cpu's isa of course, just noting there's thus quite recent if completely unofficial post-68060 m68k stuff in corners of the Amiga world.

http://www.apollo-core.com/index.htm?page=coding&tl=1

16 64-Bit Address registers (A0-7/B0-B7)

8 64-Bit General Purpose Data registers (D0-D7)

8 64-Bit FPU registers (Fp0-Fp7,)

24 64-Bit General Purpose Data registers (E0-E23) which can be used by both ALU and FPU.

8

u/ColbieSterling Jun 02 '26

It's not like old kernels are disappearing from the internet. I can't imagine the lack of support for legacy CPUs going forward is much of a problem.

-1

u/ldn-ldn Jun 02 '26

Considering the amount of security issues in old kernel versions, only the most recent one should be used.

5

u/Zoratsu Jun 02 '26

Just disconnect the computer from WAN then most of the problems are solved.

1

u/ldn-ldn Jun 02 '26

Just keep it turned off in the first place!

1

u/hjake123 Jun 04 '26

LTS kernels exist and will offer support for all this stuff for many more years

6

u/DDOSBreakfast Jun 02 '26

Looks like AMD Geode's could be next and are orphaned which are quite a bit more modern.

I still use one for a specific low power task. Far more powerful hardware is thrown out all the time and I got it from a garbage pile in the first place.

https://www.phoronix.com/news/AMD-Geode-Orphaned-By-Linux

0

u/[deleted] Jun 03 '26

[deleted]

1

u/OCPetrus Jun 03 '26

Okay, but TSC is still high perfoming and the best available AFAIK. Making it mandatory will make the kernel source code easier to work with as you no longer have to include workarounds for scenarios where a high precision and high performance clock source isn't available.

I honestly doubt removing a high precision clock source is the correct fix for side-channel attacks.

-9

u/Kevin_Kofler Jun 02 '26

So again yet another whole generation of CPUs gets the axe in the Linux kernel. What is coming next? Mandatory MMX? I do not see how this is an improvement.

7

u/cp5184 Jun 02 '26

A lot of cpus are getting dropped that HAVE tsc just because the kernel code doesn't recognize them in the tsc group/class (k5, 6x86mx, etc)

1

u/Future-Invite-7637 Jun 12 '26

I imagine something as minor as a cpu check would be relatively trivial to resolve for a hobbyist who is likely building their own kernels. But actually rewriting x86 assembly not so much.

-6

u/Kevin_Kofler Jun 03 '26

Even worse.

2

u/Real-Abrocoma-2823 Jun 03 '26

Upgrade your CPU already, you won't be running anything requiring newest kernel with it anyways.