Re: [PATCH] lib/crypto: sha256: Use underlying functions instead of crypto_simd_usable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 31, 2025 at 03:35:10PM -0700, Eric Biggers wrote:
> Since sha256_kunit tests the fallback code paths without using
> crypto_simd_disabled_for_test, make the SHA-256 code just use the
> underlying may_use_simd() and irq_fpu_usable() functions directly
> instead of crypto_simd_usable().  This eliminates an unnecessary layer.
> 
> While doing this, also add likely() annotations, and fix a minor
> inconsistency where the static keys in the sha256.h files were in a
> different place than in the corresponding sha1.h and sha512.h files.
> 
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---
>  lib/crypto/arm/sha256.h   | 10 +++++-----
>  lib/crypto/arm64/sha256.h | 10 +++++-----
>  lib/crypto/riscv/sha256.h |  8 ++++----
>  lib/crypto/x86/sha256.h   |  3 +--
>  4 files changed, 15 insertions(+), 16 deletions(-)

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next

- Eric




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux