[PATCH v5 4/5] crypto: arm64/aes-ccm - remove non-SIMD fallback path

Eric Biggers ebiggers at kernel.org
Mon May 24 14:51:51 PDT 2021


On Fri, May 21, 2021 at 12:20:52PM +0200, Ard Biesheuvel wrote:
> AES/CCM on arm64 is implemented as a synchronous AEAD, and so it is
> guaranteed by the API that it is only invoked in task or softirq
> context. Since softirqs are now only handled when the SIMD is not
> being used in the task context that was interrupted to service the
> softirq, we no longer need a fallback path. Let's remove it.
> 
> Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
> ---
>  arch/arm64/crypto/aes-ce-ccm-core.S |   1 +
>  arch/arm64/crypto/aes-ce-ccm-glue.c | 181 ++++++--------------
>  2 files changed, 53 insertions(+), 129 deletions(-)

This doesn't just remove the no-SIMD fallback, but it also does some
refactoring.  Notably, it starts to process all the authenticated data in one
kernel_neon_begin() / kernel_neon_end() pair rather than many.  Can you explain
why that is okay now when previously it wasn't, and also split this into two
separate commits?

- Eric



More information about the linux-arm-kernel mailing list