3 ms·
You don't have to roll it back, you could have speculated loads store into a speculation buffer rather than directly into the cache, then at retirement the spec
by caf 9y ago
You don't have to roll it back, you could have speculated loads store into a speculation buffer rather than directly into the cache, then at retirement the spec buffer entry is committed to the cache.
- CamperBob2 9y agoPerhaps, but isn't the time taken by the line fill ultimately what's leaking the information? Sure, it's probed by monitoring L1 eviction, but I'd still be nervous about the timing. IMHO the only safe way to do a fetch from prohibited memory is to not do it at all.
- caf 9y agoNo, you can't time what happens on the mis-speculated path itself. What's leaking the information is the change to the cache state which is observable after the original mis-speculated branch is resolved (by timing subsequent accesses to addresses that alias in the cache). You can also observe changes to the TLB state, though - so you'd have to do the same buffering-and-commit dance there as well. Maybe you can also leak data through the BTB or RTB (double-Spectre!), or by tieing up particular execution units conditionally which is observable by a sibling hyperthread?