242 points · by hlandau · 8y ago · 173 comments
Could be wrong, though.
See here:
So being unsure about how many times you want to do a thing is a no-go too.
/s
https://www.phoronix.com/forums/forum/phoronix/general-discu...
https://github.com/openSUSE/kernel-source/commit/14b04164b2f...
Search for amd.com for AMD related changes.
114 changed files with 12,403 additions and 23 deletions.
That's a pretty big patch (although some of those lines are .patch file pre- and post-amble). I feel bad for the people that had to develop/qa/signoff all of that in such a short timeframe. There's got to be at least one mistake in there somewhere.They called the entry points paranoid* as in "unreasonably or obsessively anxious, suspicious, or mistrustful"?
Funny,
It does not really answer all my questions about the microcode updates, but I have not seen any more comprehensive writeups yet.
Mods, please fix the title. The patch adds ability to disable indirect branch prediction sometimes. This is not nearly the same as disabling all branch prediction always.
Perhaps that smurftower PowerMac G3 tucked into the back of the closet that's been gathering dust will be useful again.
"...the G3 and the G4, because of their limitations on indirect branching, are at least somewhat more resistant to Spectre-based attacks because it is harder to cause their speculative execution pathways to operate in an attacker-controllable fashion (particularly the G3 and the 7400, which do not have a link stack cache). So, if you're really paranoid, dust that old G3 or Sawtooth G4 off. You just might have the Yosemite that manages to survive the computing apocalypse." [1]
[1] http://tenfourfox.blogspot.com/2018/01/more-about-spectre-an...
So yeah probably you're not going to have issues in reality with a G3, especially given its small presence in modern computing, but I wouldn't choose it thinking it's immune either.
Just not MacOS yosemite, more likely Linux/PPC or Open/NetBSD... :D
If you have a completely foss system and don't execute random code from the internet, you can very safely still enjoy the full power of the hardware.
Less say we take a recent CPU and just totally turn off speculative execution.
Just how bad a performance hit would that likely be? 30%? 50%? 75%? 90%?
Does anyone even know for modern processors?
For a more fun answer than an exam, consider that the real estate on a CPU is typically dominated by two things, cache and out-of-order speculation hardware(predictors and such). Then, turning off speculative execution would be like turning off a third of your CPU. As to the actual performance impact, it'd be massive. There's a reason why no modern processor is in-order.
No modern performance-oriented processor, that is. Plenty of low-power, area-constrained embedded ones still are. The Intel Quark series of SoCs, for example. Those are basically a very fast 486, with the same 5-stage in-order pipeline. (For some amusement, get Quark datasheet and compare it with the 486 datasheet --- some of the microarchitecture diagrams are identical, and some clearly had only "Intel486" replaced roughly with "IntelQuark".)
out-of-order is just one way that a hardware vendor choose to increase performance. Mill choose an other way.
You can still have out-of-order execution without branch prediction.
That said, I'm inclined to believe you're right about a massive performance impact (for many programs at least).
It is done somewhat as a hack. Overhead on system calls should be relatively low still.
So would it be possible (through a microcode update) to mask the memory values, so that ANY read from privileged gets a NULL value returned?
Or could that cause issues, due to the fact that a branch that doesn't currently have access to a memory segment, may be granted legitimate access to it by the time it would normally be executed?
There are few security or performance guarantees. It is not an architecture geared to realtime and fully deterministic operation.
I don't think that's a fair way of stating it. I think it's a case of independent performance improvements in branch prediction, cache architecture and out-of-order instruction retirement that on their own have negligible security impact but when combined in a single system reveal emergent behavior.
It doesn't even have to be that drastic, the CPU can still fetch any memory that's not calculated. Both sides of a non-computed jump for instance, or the next line of an array that's being scanned in order.
Some memory references would be sequential instead of overlapped, but it wouldn't be the end of the world.
I think not speculatively modifying the cache at all throws away significant MLP, which is extremely important in CPUs these days.
So the branch predictor only needs to be cleared after any interrupt or syscall return.
I guess that AMD uCode updates are applicable to the Raspberry PI.
This all simply makes all our IT related work just kids playing make-pretend security.
I am literally trying to figure out what other processors exist that can be used in everyday BSD/Linux work. Sparc? Some ARM branch? Any suggestions welcome.
Instead of false promises we need to develop better engineering: verification, computational math, etc. And also laws - no free/open license in the world will stop companies from tracking, but fine as big as 4% of total revenue (EU GDPR) will make them oblige.
In a world where personal computers only ran code the user could safely trust, these exploits would only be full attack vectors when applied to multi-tenant computing environments.
I'm not arguing that FOSS systems are inherently more secure than closed systems, but when it comes to exploits that require arbitrary code execution to be effective, Stallman really was/is right. Between a NoScript browser extension and a system whose source code is entirely available to you, you've basically got Meltdown/Spectre immunity.
I personally trust FOSS software more not to do dumb things (like, hopefully my password manager doesn't report all my passwords to NSA), but simply being FOSS doesn't make it any more secure :)
Out of order variants are still in the design stage, so they may come up with a way to isolate or invalidate speculation effects on branch misprediction.
My Windows 10 machine got the Meltdown patch yesterday, in an out-of-band, undelayable update. Then it restarted itself during the night and this morning it's secure. My Ubuntu laptop is still unpatched and I'm not sure when the 4.15 upgrade will come to 16.04.
His thoughts on cloud computing, however, are very much worth listening to.
https://stallman.org/stallman-computing.html
Scroll down to the point titled "I am careful in how I use the Internet."
Given that Spectre is trivially exploitable from motherfucking JavaScript, this bit of craziness turns out to have concealed much wisdom.
With some encouraging sentences to keep on making the world a better place.
He felt honored. He asked me to post this for him.
"Now that you recognize these problems are real, how about joining in the work to fix them? See gnu.org/help for a list of many different kinds of work that we need (programming is just one of many), then pick one and help!"
This is a specific side-channel attack in a super complicated system. Even if we had OSS x86/64 processors, this more similar to the protocol issues found in openssl.
Richard Stallman was right and I wish we would learn to listen but I doubt that will happen.
Bastard had the nerve to tell Alexander to "stand a little out of my sun."
Total nutjob. No respect for wealth and power whatsoever.
I really hope that this is just poor wording and that branch prediction is either disabled in extremely rare circumstances or they just exposed some control mechanism like Intel did which allows you to control the branching.
EDIT:
AMD's response was that mitigation from their side isn't needed for SPECTRE either:
http://www.guru3d.com/news-story/amd-rsponds-on-amd-processo...
I really wonder what has changed, and if now they are vulnerable to variant 2, have they underestimated MELTDOWN as well?
I'm also looking forward for people to look into the victim cache that AMD has implemented with Zen and if InfinityFabric and the added latency between CCXs can't be exploited for side channels attacks.
AMD is not affected by Meltdown, true, but Meltdown is also easier to fix. The other issues do affect AMD, and are MUCH harder to fix (also harder to use it should be pointed out).
Meltdown was disclosed first, so everyone was excited to bash Intel. But that was premature.
I never thought I'd see this headline in my life.