4 ms·
As an alternative to this approach, I wonder if it's possible to push all sensitive computations into a few small components, and rewrite those components caref
by _cs2017_ 7y ago
As an alternative to this approach, I wonder if it's possible to push all sensitive computations into a few small components, and rewrite those components carefully to obscure any information that could be obtained from timing?
- FrozenVoid 7y agoOf course. Branchless code equivalents can be written for practically anything, and you can force-prefetch memory regardless of branch(its an intrinsic in most C compilers), though this loses performance and branch prediction benefits.
- _cs2017_ 7y agoWouldn't this approach be cheaper, both in performance and human effort, than fixing the entire OS to hide the timing information?
- FrozenVoid 7y agoIt would require doing this for any new/existing code exposing timing information, the current timing fixes/isolation patches are much smaller. It would make more sense in user code, like browsers/media players/etc to remove influence of branch prediction regardless of host OS, just like GCC does with retpoline insertion.