3 ms·
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
by ori_b 8y ago
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.
- andreiw 8y agoConsidering 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...
- deleted 8y ago[deleted]
- modeless 8y agoI 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.
- ori_b 8y ago> 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.
- modeless 8y agoI'm talking about a hardware mitigation that would allow software isolation to work again, without disabling speculation.
- ori_b 8y agoI 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.