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 14:03:26 +0000 (15:03 +0100)
commitbd34ecbae008f23f9d64375ef766148e23084ccf
treea844c5aa6ce2fccd32479ca4fa14159ded3976f4
parentba26fa14556ba49466d51e4d9e6be32afee9c465
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)
crypto/bn/asm/x86-mont.pl
crypto/bn/asm/x86_64-mont.pl
crypto/bn/asm/x86_64-mont5.pl