Add value_barriers in constant time select functions
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 21 Jun 2019 19:26:19 +0000 (21:26 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 19 Jul 2019 18:33:08 +0000 (20:33 +0200)
commit92a2f01ea40ec52f8f77893ff433dc47c1f5b9ef
tree842faf0153799ac3c10cfbbddcb91450e6ed3ff3
parent69ae4153af5a6e62369611b694748c846a461d02
Add value_barriers in constant time select functions

The barriers prevent the compiler from narrowing down the
possible value range of the mask and ~mask in the select
statements, which avoids the recognition of the select
and turning it into a conditional load or branch.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9418)
include/internal/constant_time_locl.h