]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
arm: crypto: reduce priority of bit-sliced AES cipher
authorEric Biggers <ebiggers@google.com>
Fri, 17 Nov 2017 19:50:27 +0000 (11:50 -0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 13 Mar 2018 10:24:54 +0000 (11:24 +0100)
commit48ed4b2c83b4b14ee966fbec827e586682c66b21
tree52d5dd8248058bb7d01d2243ca627a37a6334810
parent880be240d62e295721a4f797a99ea757ae1de275
arm: crypto: reduce priority of bit-sliced AES cipher

BugLink: http://bugs.launchpad.net/bugs/1744639
[ Not upstream because this is a minimal fix for a bug where arm32
  kernels can use a much slower implementation of AES than is actually
  available, potentially forcing vendors to disable encryption on their
  devices.]

All the aes-bs (bit-sliced) and aes-ce (cryptographic extensions)
algorithms had a priority of 300.  This is undesirable because it means
an aes-bs algorithm may be used when an aes-ce algorithm is available.
The aes-ce algorithms have much better performance (up to 10x faster).

Fix it by decreasing the priority of the aes-bs algorithms to 250.

This was fixed upstream by commit cc477bf64573 ("crypto: arm/aes -
replace bit-sliced OpenSSL NEON code"), but it was just a small part of
a complete rewrite.  This patch just fixes the priority bug for older
kernels.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/arm/crypto/aesbs-glue.c