]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: arm64/aes-ccm-ce: fix for big endian
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 11 Oct 2016 18:15:17 +0000 (19:15 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Oct 2016 03:03:43 +0000 (11:03 +0800)
commit6df26323a10231e4e510997fde7e7abceb82c9b4
treed3686c5d4ba2954d644efcec81ee77e6c572dbc6
parenta8e031cf06c7ce974f3c2ab1c61f5d8ababae7fa
crypto: arm64/aes-ccm-ce: fix for big endian

The AES-CCM implementation that uses ARMv8 Crypto Extensions instructions
refers to the AES round keys as pairs of 64-bit quantities, which causes
failures when building the code for big endian. In addition, it byte swaps
the input counter unconditionally, while this is only required for little
endian builds. So fix both issues.

Fixes: 1d8dcb213fd3 ("arm64/crypto: use crypto instructions to generate AES key schedule")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/aes-ce-ccm-core.S