]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: arm/aes-ce - build for v8 architecture explicitly
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 17 Sep 2019 08:50:00 +0000 (09:50 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 1 Oct 2019 13:06:42 +0000 (23:06 +1000)
commitd33b58d1f8e6c1d5b2bac811ff18ecd1460e470d
tree839e5488f495098249be4965f2e658447abea64b
parentaf0bfea2087598aae85e5f2a4d4fd856a44df6e9
crypto: arm/aes-ce - build for v8 architecture explicitly

The NEON/Crypto Extensions based AES implementation for 32-bit ARM
can be built in a kernel that targets ARMv6 CPUs and higher, even
though the actual code will not be able to run on that generation,
but it allows for a portable image to be generated that can will
use the special instructions only when they are available.

Since those instructions are part of a FPU profile rather than a
CPU profile, we don't override the architecture in the assembler
code, and most of the scalar code is simple enough to be ARMv6
compatible. However, that changes with commit 9afe458b31df9176,
which introduces calls to the movw/movt instructions, which are
v7+ only.

So override the architecture in the .S file to armv8-a, which
matches the architecture specification in the crypto-neon-fp-armv8
FPU specificier that we already using. Note that using armv7-a
here may trigger an issue with the upcoming Clang 10 release,
which no longer permits .arch/.fpu combinations it views as
incompatible.

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 9afe458b31df9176 ("crypto: arm/aes-ce - implement ciphertext stealing ...")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/crypto/aes-ce-core.S