News for hackers. Stuff that matters.
Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by kibwen on Wednesday May 30, 2018 @12:30PM (#17189099)
AFAIK, all the CPU microcode updates were for fixing Meltdown, not Spectre. Unless and until CPU manufacturers find a way to fix speculative execution for good, software-based mitigations would seem to be mandatory.
Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by ori_b on Wednesday May 30, 2018 @02:09PM (#17190046)
The problem is that "fixing speculative execution" means "stopping to make things faster in any measurable way". Given that the caches are there to make things 2 orders of magnitude faster, this is rather crippling.

The hardware based protections are the only boundary where you can "fix" speculative execution without slowing down your system by 100x.

The hardware boundaries effectively act as hints that say to the hardware "slowing down things by 100x here won't kill performance too badly -- we should turn off speculation for safety". Without those hints, everything needs to get that much slower.

Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by andreiw on Wednesday May 30, 2018 @02:18PM (#17190134)
Considering the hardware mitigations aren’t some magic bullet, but are a “big hammer” that cripples CPU OoO behavior in crrtain ways for everything, software mitigations don’t seem that unreasonable. Of course, “software mitigations” use CPU facilities as well, and can allow for making critical sections safe. In practice, it is well understood what code needs to be written in a spectre-safe way. The difficult question isnhow to write code to anticipate the next 10 varieties of speculation attacks...
Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by modeless on Wednesday May 30, 2018 @03:05PM (#17190673)
I do not believe that it's impossible to fix Spectre in hardware without disabling speculation. How about we fix the state changes that Spectre detects. For example, we could have a buffer that stores evicted cache lines during speculation and restores them if a rollback is necessary. Yeah, it wouldn't be free, but it would be faster than disabling all speculation.
Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by ori_b on Wednesday May 30, 2018 @06:30PM (#17192467)
> For example, we could have a buffer that stores evicted cache lines during speculation and restores them if a rollback is necessary

The problem is that with pure software isolation, as being discussed here, every access is observable within the "same program", so every speedup would need to be rolled back.

With hardware boundaries, you know which speculations to roll back (or just avoid doing), so you can put a fix in silicon.

Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by modeless on Wednesday May 30, 2018 @07:09PM (#17192684)
I'm talking about a hardware mitigation that would allow software isolation to work again, without disabling speculation.
Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by ori_b on Wednesday May 30, 2018 @08:25PM (#17193036)
I understand that. You cannot make this work, because in the case of pure software isolation, any instruction can theoretically be used to snoop on any other instruction. That means speculation can theoretically be detectable if it speeds up anything.
Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by muricula on Wednesday May 30, 2018 @03:16PM (#17190762)
Unfortunately, this is not correct. Intel and AMD exposed MSRs for the Indirect Branch Prediction Buffer (variant 2), Indirect Branch Restricted Speculation (variant 2), and Memory Disambiguation Disable (variant 4). Variant 1 is unfixed. Variant 3 is meltdown.
Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by sp332 on Wednesday May 30, 2018 @12:43PM (#17189222)
AMD also pushed firmware updates, and they weren't affected by Meltdown.
Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by kibwen on Wednesday May 30, 2018 @12:49PM (#17189276)
Do you have a link to the firmware update announcement? Are there patch notes?
Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by sp332 on Wednesday May 30, 2018 @01:42PM (#17189779)
This is the latest I've heard about it: https://arstechnica.com/gadgets/2018/04/latest-windows-updat... I think the firmware generally comes from vendors, which for personal PCs means motherboard manufacturers. I did find this linked from an older Verge article: https://www.amd.com/en/corporate/security-updates
Re:Nebulet: A microkernel that runs WebAssembly in Ring 0 by kibwen on Wednesday May 30, 2018 @03:21PM (#17190818)
Thanks for the links. But the Ars link seems to confirm that all these mitigations need to be done in software, and that the firmware updates merely give the OS the hooks necessary to implement their own mitigations (implying that application software didn't get or need any help from the CPU in applying mitigations). And if all this is being done in software anyway, then it would seem to suggest that should at least partially suffice for a scheme like the OP's (someone who knows more about what these hooks actually do should say more). I'm not sure whether that means it's as secure in practice as conventional OSes--naively we should expect that it's not until proven otherwise--but it also appears to be a far cry from the above claim that "software isolated processes are now basically impossible to do", which, even if true, seems true as well for the software we already have.