openssl/crypto/aes/asm
Ard Biesheuvel 26217510d2 aes/asm/aesv8-armx.pl: avoid 32-bit lane assignment in CTR mode
ARM Cortex-A57 and Cortex-A72 cores running in 32-bit mode are affected
by silicon errata #1742098 [0] and #1655431 [1], respectively, where the
second instruction of a AES instruction pair may execute twice if an
interrupt is taken right after the first instruction consumes an input
register of which a single 32-bit lane has been updated the last time it
was modified.

This is not such a rare occurrence as it may seem: in counter mode, only
the least significant 32-bit word is incremented in the absence of a
carry, which makes our counter mode implementation susceptible to these
errata.

So let's shuffle the counter assignments around a bit so that the most
recent updates when the AES instruction pair executes are 128-bit wide.

[0] ARM-EPM-049219 v23 Cortex-A57 MPCore Software Developers Errata Notice
[1] ARM-EPM-012079 v11.0 Cortex-A72 MPCore Software Developers Errata Notice

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13504)
2020-11-30 12:14:54 +01:00
..
aes-586.pl Update copyright year 2020-04-23 13:55:52 +01:00
aes-armv4.pl Update copyright year 2020-04-23 13:55:52 +01:00
aes-c64xplus.pl Update copyright year 2020-04-23 13:55:52 +01:00
aes-ia64.S
aes-mips.pl Update copyright year 2020-04-23 13:55:52 +01:00
aes-parisc.pl Update copyright year 2020-04-23 13:55:52 +01:00
aes-ppc.pl Update copyright year 2020-04-23 13:55:52 +01:00
aes-s390x.pl Update copyright year 2020-04-23 13:55:52 +01:00
aes-sparcv9.pl Update copyright year 2020-04-23 13:55:52 +01:00
aes-x86_64.pl Update copyright year 2020-04-23 13:55:52 +01:00
aesfx-sparcv9.pl Update copyright year 2020-04-23 13:55:52 +01:00
aesni-mb-x86_64.pl Ignore vendor name in Clang version number. 2020-08-27 20:27:26 -07:00
aesni-sha1-x86_64.pl Ignore vendor name in Clang version number. 2020-08-27 20:27:26 -07:00
aesni-sha256-x86_64.pl Ignore vendor name in Clang version number. 2020-08-27 20:27:26 -07:00
aesni-x86_64.pl Update copyright year 2020-04-23 13:55:52 +01:00
aesni-x86.pl Update copyright year 2020-04-23 13:55:52 +01:00
aesp8-ppc.pl Update copyright year 2020-04-23 13:55:52 +01:00
aest4-sparcv9.pl Update copyright year 2020-04-23 13:55:52 +01:00
aesv8-armx.pl aes/asm/aesv8-armx.pl: avoid 32-bit lane assignment in CTR mode 2020-11-30 12:14:54 +01:00
bsaes-armv7.pl Update copyright year 2020-04-23 13:55:52 +01:00
bsaes-x86_64.pl Update copyright year 2020-04-23 13:55:52 +01:00
vpaes-armv8.pl Update copyright year 2020-04-23 13:55:52 +01:00
vpaes-ppc.pl Update copyright year 2020-04-23 13:55:52 +01:00
vpaes-x86_64.pl Update copyright year 2020-04-23 13:55:52 +01:00
vpaes-x86.pl Update copyright year 2020-04-23 13:55:52 +01:00