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 <herb...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Reply via email to