[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Andy Polyakov
appro at openssl.org
Sun May 24 19:27:49 UTC 2015
The branch OpenSSL_1_0_2-stable has been updated
via 0945bfcb22f1df1d89e84973f175a620adab4f0d (commit)
via f5d840a079d18b3efad7938070b964f82e9bbcaf (commit)
from 886ef2b650768d8960e769707055eb79c32a0125 (commit)
- Log -----------------------------------------------------------------
commit 0945bfcb22f1df1d89e84973f175a620adab4f0d
Author: Andy Polyakov <appro at openssl.org>
Date: Wed May 20 09:24:36 2015 +0200
bn/bn_gf2m.c: appease STACK, unstable code detector.
RT#3852
Reviewed-by: Richard Levitte <levitte at openssl.org>
(cherry picked from commit 86e5d1e32b2d702a5fc777e612cd746e790098ef)
commit f5d840a079d18b3efad7938070b964f82e9bbcaf
Author: Andy Polyakov <appro at openssl.org>
Date: Wed May 13 22:19:59 2015 +0200
bn/asm/vis3-mont.pl: fix intermittent EC failures on SPARC T3.
BLKINIT optimization worked on T4, but for some reason appears "too
aggressive" for T3 triggering intermiitent EC failures. It's not clear
why only EC is affected...
Reviewed-by: Tim Hudson <tjh at openssl.org>
(cherry picked from commit 579734ced696125c0768a2f4e56e97939b0e6e49)
-----------------------------------------------------------------------
Summary of changes:
crypto/bn/asm/vis3-mont.pl | 10 +++++-----
crypto/bn/bn_gf2m.c | 3 +--
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/crypto/bn/asm/vis3-mont.pl b/crypto/bn/asm/vis3-mont.pl
index a1357de..263ac02 100644
--- a/crypto/bn/asm/vis3-mont.pl
+++ b/crypto/bn/asm/vis3-mont.pl
@@ -100,7 +100,7 @@ $code.=<<___;
ld [$ap+12], $t3
or $t0, $aj, $aj
add $ap, 16, $ap
- stxa $aj, [$anp]0xe2 ! converted ap[0]
+ stx $aj, [$anp] ! converted ap[0]
mulx $aj, $m0, $lo0 ! ap[0]*bp[0]
umulxhi $aj, $m0, $hi0
@@ -150,7 +150,7 @@ $code.=<<___;
sllx $t1, 32, $aj
add $ap, 8, $ap
or $t0, $aj, $aj
- stxa $aj, [$anp]0xe2 ! converted ap[j]
+ stx $aj, [$anp] ! converted ap[j]
ld [$np+0], $t2 ! np[j]
addcc $nlo, $hi1, $lo1
@@ -169,7 +169,7 @@ $code.=<<___;
addcc $lo0, $lo1, $lo1 ! np[j]*m1+ap[j]*bp[0]
umulxhi $nj, $m1, $nj ! nhi=nj
addxc %g0, $hi1, $hi1
- stxa $lo1, [$tp]0xe2 ! tp[j-1]
+ stx $lo1, [$tp] ! tp[j-1]
add $tp, 8, $tp ! tp++
brnz,pt $cnt, .L1st
@@ -182,12 +182,12 @@ $code.=<<___;
addxc $nj, %g0, $hi1
addcc $lo0, $lo1, $lo1 ! np[j]*m1+ap[j]*bp[0]
addxc %g0, $hi1, $hi1
- stxa $lo1, [$tp]0xe2 ! tp[j-1]
+ stx $lo1, [$tp] ! tp[j-1]
add $tp, 8, $tp
addcc $hi0, $hi1, $hi1
addxc %g0, %g0, $ovf ! upmost overflow bit
- stxa $hi1, [$tp]0xe2
+ stx $hi1, [$tp]
add $tp, 8, $tp
ba .Louter
diff --git a/crypto/bn/bn_gf2m.c b/crypto/bn/bn_gf2m.c
index aeee49a..1981f16 100644
--- a/crypto/bn/bn_gf2m.c
+++ b/crypto/bn/bn_gf2m.c
@@ -450,8 +450,7 @@ int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[])
d0 = p[k] % BN_BITS2;
d1 = BN_BITS2 - d0;
z[n] ^= (zz << d0);
- tmp_ulong = zz >> d1;
- if (d0 && tmp_ulong)
+ if (d0 && (tmp_ulong = zz >> d1))
z[n + 1] ^= tmp_ulong;
}
More information about the openssl-commits
mailing list