]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix ChaCha assembly code on 32-bit HPUX itanium systems
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Tue, 8 Aug 2023 04:48:33 +0000 (06:48 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 9 Aug 2023 10:22:20 +0000 (12:22 +0200)
This fixes the reported crashes 32-bit HPUX systems due to
raw out and inp pointer values, and adds one nop instruction
on 64-bit systems, like it is done in other assembly modules
for those systems.

The fix was tested by @johnkohl-hcl see:
https://github.com/openssl/openssl/issues/17067#issuecomment-1668468033

Fixes #17067

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21681)

crypto/chacha/asm/chacha-ia64.pl

index b13d972855754d2a41bcc4d309ec632a22e9685f..78201649d550291a12c6d9f8930c9860e72dc1dd 100644 (file)
@@ -46,6 +46,8 @@ ChaCha20_ctr32:
        ADDP            @k[11]=4,$key
        .save           ar.lc,r3
        mov             r3=ar.lc                }
+{ .mmi;        ADDP            $out=0,$out
+       ADDP            $inp=0,$inp             }
 { .mmi;        ADDP            $key=0,$key
        ADDP            $counter=0,$counter
        .save           pr,r14