]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: arm64/aes-ccm - yield NEON when processing auth-only data
authorArd Biesheuvel <ardb@kernel.org>
Fri, 27 Aug 2021 07:03:39 +0000 (09:03 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Sep 2021 03:05:10 +0000 (11:05 +0800)
commit1e386ab63f11c40ef86e8104a49ee822246e065d
tree069d49cbb87cf43294ea53262af93902798d9026
parent823661f5dc8befdcff0635b2876f15673d382173
crypto: arm64/aes-ccm - yield NEON when processing auth-only data

In SIMD accelerated crypto drivers, we typically yield the SIMD unit
after processing 4 KiB of input, to avoid scheduling blackouts caused by
the fact that claiming the SIMD unit disables preemption as well as
softirq processing.

The arm64 CCM driver does this implicitly for the ciphertext, due to the
fact that the skcipher API never processes more than a single page at a
time. However, the scatterwalk performed by this driver when processing
the authenticate-only data will keep the SIMD unit occupied until it
completes.

So cap the scatterwalk steps to 4 KiB.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/crypto/aes-ce-ccm-glue.c