[llvm-dev] Side-channel resistant values

David Zarzycki via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 12 03:06:43 PDT 2019


I think adding a builtin to force CMOV or similar instructions on other architectures is long overdue. It’s generally useful, even if one isn’t mitigating speculative execution.

> On Sep 12, 2019, at 12:30 PM, Daan Sprenkels via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> PS. Perhaps, would there be interest to add such a feature to LLVM?
> I found this repository on GitHub[2], adding a `__builtin_ct_choose`
> intrinsic to clang. But as far as I know, this has never been upstreamed.
> 
> [1]: Chandler Carruth described this trick at CppCon15:
> <https://youtu.be/nXaxk27zwlk?t=2472 <https://youtu.be/nXaxk27zwlk?t=2472>>. See it in practice:
> <https://godbolt.org/z/UMPeku <https://godbolt.org/z/UMPeku>>
> [2]: <https://github.com/lmrs2/ct_choose <https://github.com/lmrs2/ct_choose>>,
> <https://github.com/lmrs2/llvm/commit/8f9a4d952100ae03d06f10aee237bf8b3331da89 <https://github.com/lmrs2/llvm/commit/8f9a4d952100ae03d06f10aee237bf8b3331da89>>.
> Later published at S&P18.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190912/91989f05/attachment-0001.html>


More information about the llvm-dev mailing list