[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aA2-x-grUfoulkDf@gondor.apana.org.au>
Date: Sun, 27 Apr 2025 13:21:11 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Eric Biggers <ebiggers@...nel.org>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mips@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org, sparclinux@...r.kernel.org,
linux-s390@...r.kernel.org, x86@...nel.org,
Ard Biesheuvel <ardb@...nel.org>,
"Jason A . Donenfeld " <Jason@...c4.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 11/13] crypto: x86/sha256 - implement library instead of
shash
On Fri, Apr 25, 2025 at 11:50:37PM -0700, Eric Biggers wrote:
>
> +void sha256_blocks_arch(u32 state[SHA256_STATE_WORDS],
> + const u8 *data, size_t nblocks)
> +{
> + if (static_branch_likely(&have_sha256_x86) && crypto_simd_usable()) {
> + kernel_fpu_begin();
> + static_call(sha256_blocks_x86)(state, data, nblocks);
> + kernel_fpu_end();
> + } else {
> + sha256_blocks_generic(state, data, nblocks);
> + }
> +}
> +EXPORT_SYMBOL(sha256_blocks_arch);
Because of the back-reference to sha256_blocks_generic, I get
this with a fully modular build:
depmod: ERROR: Cycle detected: libsha256 -> sha256_x86_64 -> libsha256
depmod: ERROR: Found 2 modules in dependency cycles!
I'm going to split libsha256 up into the block function and the
lib API.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists