boringssl/crypto/bn
Adam Langley 0bf9d6d554 bn/asm/x86[_64]-mont*.pl: implement slightly alternative page-walking.
(Imports upstream's 3ba1ef829cf3dd36eaa5e819258d90291c6a1027.)

Original strategy for page-walking was adjust stack pointer and then
touch pages in order. This kind of asks for double-fault, because
if touch fails, then signal will be delivered to frame above adjusted
stack pointer. But touching pages prior adjusting stack pointer would
upset valgrind. As compromise let's adjust stack pointer in pages,
touching top of the stack. This still asks for double-fault, but at
least prevents corruption of neighbour stack if allocation is to
overstep the guard page.

Also omit predict-non-taken hints as they reportedly trigger illegal
instructions in some VM setups.

Change-Id: Ife42935319de79c6c76f8df60a76204c546fd1e0
Reviewed-on: https://boringssl-review.googlesource.com/13775
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
2017-02-14 00:14:21 +00:00
..
asm bn/asm/x86[_64]-mont*.pl: implement slightly alternative page-walking. 2017-02-14 00:14:21 +00:00
add.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
bn_asn1.c Rename the BIGNUM ASN.1 functions. 2016-01-27 22:37:44 +00:00
bn_test.cc Add BN_is_pow2, BN_mod_pow2, and BN_nnmod_pow2. 2017-02-09 22:40:12 +00:00
bn_tests.txt bn/asm/x86_64-mont5.pl: fix carry bug in bn_sqr8x_internal. 2017-01-26 18:29:44 +00:00
bn.c Remove BN_FLG_CONSTTIME. 2017-01-12 02:00:44 +00:00
check_bn_tests.go Fix mixed comment markers. 2016-08-01 14:52:39 +00:00
CMakeLists.txt Remove rsaz-x86_64.pl from CMake inputs. 2016-12-19 08:39:37 -08:00
cmp.c Add BN_is_pow2, BN_mod_pow2, and BN_nnmod_pow2. 2017-02-09 22:40:12 +00:00
convert.c Add Little-endian BIGNUM conversions 2017-01-06 18:20:09 +00:00
ctx.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
div.c Add BN_is_pow2, BN_mod_pow2, and BN_nnmod_pow2. 2017-02-09 22:40:12 +00:00
exponentiation.c Remove BN_FLG_CONSTTIME. 2017-01-12 02:00:44 +00:00
gcd.c Remove BN_FLG_CONSTTIME. 2017-01-12 02:00:44 +00:00
generic.c Fix up macros. 2016-10-18 18:28:23 +00:00
internal.h Don't use BN_mod_inverse for inverses mod p in RSA keygen. 2017-01-04 13:56:11 +00:00
kronecker.c Fix BN_kronecker on unreachable BN_rshift error. 2016-12-12 21:40:20 +00:00
montgomery_inv.c Calculate Montgomery RR without division. 2016-12-16 17:41:01 +00:00
montgomery.c Remove BN_FLG_CONSTTIME. 2017-01-12 02:00:44 +00:00
mul.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
prime.c Add constants for BN_rand and use them. 2016-08-18 18:18:31 +00:00
random.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
rsaz_exp.c Remove RSAZ-512. 2016-12-14 22:12:50 +00:00
rsaz_exp.h Remove RSAZ-512. 2016-12-14 22:12:50 +00:00
shift.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
sqrt.c Check for BN_lshift failure in BN_sqrt. 2016-11-29 00:55:56 +00:00