Re: [PATCH v2 0/9] crypto: x86 - stop using the SIMD helper

Herbert Xu
2025-04-02T08:22:25Z

On Wed, Apr 02, 2025 at 09:34:30AM +0300, Ard Biesheuvel wrote:
>
> Ah, never mind - I see some calls on 32-bit ARM to
> simd_skcipher_create_compat(), which have become redundant now that
> SIMD is guaranteed to be available in softirq context.

Thanks!

We could also remove all the calls to crypto_simd_usable in the
Crypto API hashing code, e.g., arch/arm64/crypto/sha1-ce-glue.c.

For the lib/crypto code I think we should make it a rule to
not allow any hardirq usage just like the Crypto API. Does
anyone know of any uses of lib/crypto in a hardirq?

I thought /dev/random might do that but it looks like Jason has
fixed it so that crypto code is no longer used in hardirqs:

commit e3e33fc2ea7fcefd0d761db9d6219f83b4248f5c
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date: Fri May 6 18:30:51 2022 +0200

random: do not use input pool from hard IRQs

Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt