crypto: arm64/aes-ccm - reduce NEON begin/end calls for common case
authorArd Biesheuvel <ardb@kernel.org>
Fri, 27 Aug 2021 07:03:41 +0000 (09:03 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Sep 2021 03:05:11 +0000 (11:05 +0800)
commit741691c44606b1903e674d12f3e4a4b68ade69ad
tree3bcc24ec59d3944c29b7a6335e235dd25113ce09
parentb3482635e5d69c8a40288bd025f61a994b3b1126
crypto: arm64/aes-ccm - reduce NEON begin/end calls for common case

AES-CCM (as used in WPA2 CCMP, for instance) typically involves
authenticate-only data, and operates on a single network packet, and so
the common case is for the authenticate, en/decrypt and finalize SIMD
helpers to all be called exactly once in sequence. Since
kernel_neon_end() now involves manipulation of the preemption state as
well as the softirq mask state, let's reduce the number of times we are
forced to call it to only once if we are handling this common case.

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