[openssl] master update
Dr. Paul Dale
pauli at openssl.org
Wed Feb 9 02:24:53 UTC 2022
The branch master has been updated
via 3a23f01268ec47bf3423b849cc226be220745522 (commit)
from 09030ee73693411c19b596cb0e0f43eb512ac0e6 (commit)
- Log -----------------------------------------------------------------
commit 3a23f01268ec47bf3423b849cc226be220745522
Author: Tom Cosgrove <tom.cosgrove at arm.com>
Date: Mon Feb 7 14:44:56 2022 +0000
aarch64: fix branch target indications in arm64cpuid.pl and keccak1600
Add missing AARCH64_VALID_CALL_TARGET to armv8_rng_probe(). Also add
these to the functions defined by gen_random(), and note that this Perl
sub prints the assembler out directly, not going via the $code xlate
mechanism (and therefore coming before the include of arm_arch.h). So
fix this too.
In KeccakF1600_int, AARCH64_SIGN_LINK_REGISTER functions as
AARCH64_VALID_CALL_TARGET on BTI-only builds, so it needs to come before
the 'adr' line.
Change-Id: If241efe71591c88253a3e36647ced00300c3c1a3
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17653)
-----------------------------------------------------------------------
Summary of changes:
crypto/arm64cpuid.pl | 9 ++++++---
crypto/sha/asm/keccak1600-armv8.pl | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/crypto/arm64cpuid.pl b/crypto/arm64cpuid.pl
index ebea4be59c..3ba593a488 100755
--- a/crypto/arm64cpuid.pl
+++ b/crypto/arm64cpuid.pl
@@ -189,6 +189,7 @@ CRYPTO_memcmp:
.globl _armv8_rng_probe
.type _armv8_rng_probe,%function
_armv8_rng_probe:
+ AARCH64_VALID_CALL_TARGET
mrs x0, s3_3_c2_c4_0 // rndr
mrs x0, s3_3_c2_c4_1 // rndrrs
ret
@@ -199,7 +200,7 @@ sub gen_random {
my $rdop = shift;
my $rand_reg = $rdop eq "rndr" ? "s3_3_c2_c4_0" : "s3_3_c2_c4_1";
-print<<___;
+return <<___;
// Fill buffer with Randomly Generated Bytes
// inputs: char * in x0 - Pointer to buffer
// size_t in x1 - Number of bytes to write to buffer
@@ -208,6 +209,7 @@ print<<___;
.type OPENSSL_${rdop}_asm,%function
.align 4
OPENSSL_${rdop}_asm:
+ AARCH64_VALID_CALL_TARGET
mov x2,xzr
mov x3,xzr
@@ -244,8 +246,9 @@ OPENSSL_${rdop}_asm:
.size OPENSSL_${rdop}_asm,.-OPENSSL_${rdop}_asm
___
}
-gen_random("rndr");
-gen_random("rndrrs");
+
+$code .= gen_random("rndr");
+$code .= gen_random("rndrrs");
print $code;
close STDOUT or die "error closing STDOUT: $!";
diff --git a/crypto/sha/asm/keccak1600-armv8.pl b/crypto/sha/asm/keccak1600-armv8.pl
index cf54b62c63..40f7aa7a69 100755
--- a/crypto/sha/asm/keccak1600-armv8.pl
+++ b/crypto/sha/asm/keccak1600-armv8.pl
@@ -126,8 +126,8 @@ $code.=<<___;
.type KeccakF1600_int,%function
.align 5
KeccakF1600_int:
- adr $C[2],iotas
AARCH64_SIGN_LINK_REGISTER
+ adr $C[2],iotas
stp $C[2],x30,[sp,#16] // 32 bytes on top are mine
b .Loop
.align 4
More information about the openssl-commits
mailing list