bn/asm/ppc-mont.pl: signal no-op in 32-bit bit build.
authorAndy Polyakov <appro@openssl.org>
Mon, 21 Nov 2016 14:15:52 +0000 (15:15 +0100)
committerAndy Polyakov <appro@openssl.org>
Fri, 25 Nov 2016 16:18:24 +0000 (17:18 +0100)
The bug was introduced in 80d27cdb84985c697f8fabb7649abf1f54714d13,
one too many instructions was removed. It went unnoticed, because
new subroutine introduced in previous commit is called in real-life
RSA/DSA/DH cases, while original code is called only in rare tests.
The bug was caught in test_fuzz.

Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/bn/asm/ppc-mont.pl

index fdc049ae0e3b70a8c24ff0939aa4014878f25d4b..b747f70132feb984c65f69434305c1c2752e35f0 100644 (file)
@@ -135,6 +135,7 @@ $code=<<___;
 .align 5
 .bn_mul_mont_int:
        mr      $rp,r3          ; $rp is reassigned
+       li      r3,0
 ___
 $code.=<<___ if ($BNSZ==4);
        cmpwi   $num,32         ; longer key performance is not better