bn/asm/x86[_64]-mont*.pl: complement alloca with page-walking.
authorAndy Polyakov <appro@openssl.org>
Fri, 4 Mar 2016 10:39:11 +0000 (11:39 +0100)
committerAndy Polyakov <appro@openssl.org>
Mon, 7 Mar 2016 21:16:11 +0000 (22:16 +0100)
commita15971944091fa01d959566b17ce86225346c83c
tree67cfd100d61ee26d0e5fb746ea1b68f56882be40
parent6e7a1f35b71f35296257ce634fce933f8fe41c8c
bn/asm/x86[_64]-mont*.pl: complement alloca with page-walking.

Some OSes, *cough*-dows, insist on stack being "wired" to
physical memory in strictly sequential manner, i.e. if stack
allocation spans two pages, then reference to farmost one can
be punishable by SEGV. But page walking can do good even on
other OSes, because it guarantees that villain thread hits
the guard page before it can make damage to innocent one...

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit adc4f1fc25b2cac90076f1e1695b05b7aeeae501)

Resolved conflicts:
crypto/bn/asm/x86_64-mont.pl
crypto/bn/asm/x86_64-mont5.pl

Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/bn/asm/x86-mont.pl
crypto/bn/asm/x86_64-mont.pl
crypto/bn/asm/x86_64-mont5.pl