[Cryptography] RISC-V branch predicting

William Allen Simpson william.allen.simpson at gmail.com
Wed Feb 7 09:13:07 EST 2018


On 2/5/18 1:20 PM, Arnold Reinhold wrote:
> Given that the RISC-V community has not gone very far in deploying advanced risk prediction logic, maybe simple rubrics such as those suggested in the first paragraph quoted above, along with improvements in the software tool chain, such as maybe branch prediction pragmas and better integrated profiling tools, could result in good performance while avoiding Specte type problems.
> 
Also in kernel level code and even some userland, we already use the
likely() and unlikely() hint functions.

But no matter what is done, the wrong branch will sometimes be taken.
The basic underlying problem is they didn't check access permissions
during the prediction path in exactly the same way as usual.

That created a timing side-channel opportunity.  And those are rather
difficult to fix.


More information about the cryptography mailing list