SLAM: a new Spectre technique
SLAM: a new Spectre technique
Posted Dec 7, 2023 18:34 UTC (Thu) by anton (subscriber, #25547)In reply to: SLAM: a new Spectre technique by excors
Parent article: SLAM: a new Spectre technique
Yes, you can mitigate non-speculative side channels by writing constant-time constant-memory-access code for accessing the secrets (I don't think that CPU manufacturers have defined constant-energy operations); this mitigation is practical for cryptographic code, where the code dealing with the keys is small. It is impractical for other code. However, we don't know a good hardware way to eliminate the side channels in hardware, so that is a problem that we accept.
Speculation means that all code in the address space can be used to access the secret and reveal it through a side channel (Spectre); this means that, without hardware fix, we have to put mitigations in all code, which has only been done in the kernel (and we have to hope that they put in enough mitigations, because they applied them selectively to reduce the slowdown).
But, in contrast to classic side channels, there is a way to fix Spectre in hardware that costs little performance and an acceptable amount of silicon: Divide the microarchitectural state into a speculative and committed state just as we have done with the architectural state since the mid-1990s; and when a speculation turns out to be wrong, squash the speculative microarchitectural state just like we have been doing for the architectural state. This is known in the literature as "invisible speculation". There is also a need to avoid a resource-contention side channel between the speculative and the committed world, but that is also doable.
Now all we need is that some CPU manufacturer actually implements these concepts, and we, the customers, need to buy the resulting CPUs.