Hacker News new | ask | show | jobs
by ajobaccount2017 3091 days ago
How many years should we think back?

I have some old laptops at home and they work quite well with a proper Linux setup.

Should we think in terms of slowing everything down by some factor, or just slowing tasks that need an un-throttled CPU?

3 comments

Qualifier: I'm working off articles and a few computer-architecture courses from college, so don't trust me too much here.

Taht said... Branch prediction and TLBs have been ubiquitous since about 1975. We're seeing vulnerabilities in ARM processors with unit costs of a tenth of a cent. We don't have to go that far back; if nothing else our toolchains and manufacturing techniques are far better. But if we're forced to discard speculative execution as a concept, which I think may be necessary to entirely prevent side channels, we'll be going way, way far back. Further back than the Pentium 4.

Fundamentally speaking, the power of out-of-order execution is not one of engineering. It's not like object-oriented programming or version control in that it simply makes it easier to engineer fast processors. It is more powerful on a fundamental level. And there's been so much theoretical and practical work put into it over the decades that it may take more decades to bring a different mathematical formalism up to the same level of development.

Let's just say that I really hope we don't have to throw out out-of-order execution. It'd suck. Hard.

It's not so much out of order as it is the speculative execution. Predicting a branch and then trying to run the code after the jump while you wait on the branch itself to finish calculating. At least that's my understanding from the papers. This means that otherwise normal out of order techniques like memory load/store reordering and such aren't subject to these particular attacks. I hope that attacks on them aren't found either because those are some of the biggest gains because it can allow better cache coherence and avoid misses, or make the impact of one almost non-existent since it can do other instructions while waiting on a load from system memory.
My understanding is: Speculative executive is flawed, out of order makes it hard to tell when the errors are going to be really bad.
> if we're forced to discard speculative execution as a concept

Do you have any reason to believe this will be the case?

> Further back than the Pentium 4

This is a bad example.

The Pentium 4's pitfall was a high clock speed with little concurrency, and thusly a big heat problem that limited peak computation power.

Yes, we lose some concurrency without branch prediction, but post-P4 multi-core processors would have to take some very major hits to be comparable to the P4 in a modern multi-threaded computing environment.

The P4 is just not a good reference point for old processors because of its architectural differences.

The patches you're seeing go out amount to little more than hacks that try to stop the CPU from doing branch predictions in some cases. It depends on the CPU, really. For example, and this is just a guess, netburst-era Intel CPUs may have even more of a hit as they relied on deep pipelines to get higher clockspeed, and any step in that pipeline may do a branch prediction.
I'm far from an expert in this field, but I just read the Wikipedia article on it and it says Spectre affects pretty much every processor since 1995.