From: Herbert Xu <herbert@gondor.apana.org.au>
To: Lukas Wunner <lukas@wunner.de>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
Eric Biggers <ebiggers@google.com>
Subject: Re: [v2 PATCH] Revert "crypto: run initcalls for generic implementations earlier"
Date: Mon, 9 Jun 2025 17:44:38 +0800 [thread overview]
Message-ID: <aEatBjcAmPr2Yrlg@gondor.apana.org.au> (raw)
In-Reply-To: <aEGp0MahOepfGpsm@wunner.de>
On Thu, Jun 05, 2025 at 04:29:36PM +0200, Lukas Wunner wrote:
>
> I just wanted to provide a heads-up and an opportunity for early feedback
> to this patch.
Thanks for the heads up.
Ideally the PCI enumeration should happen later, but I could
certainly live with moving the required algorithms earlier.
> diff --git a/crypto/algboss.c b/crypto/algboss.c
> index 846f586..74517f2 100644
> --- a/crypto/algboss.c
> +++ b/crypto/algboss.c
> @@ -247,7 +247,7 @@ static void __exit cryptomgr_exit(void)
> BUG_ON(err);
> }
>
> -module_init(cryptomgr_init);
> +subsys_initcall(cryptomgr_init);
Shouldn't this be one earlier than subsys_initcall as otherwise
you're at the whim of linker ordering?
> diff --git a/crypto/sha256.c b/crypto/sha256.c
> index 4aeb213..a20c920 100644
> --- a/crypto/sha256.c
> +++ b/crypto/sha256.c
> @@ -264,7 +264,7 @@ static int __init crypto_sha256_mod_init(void)
> num_algs -= 2;
> return crypto_register_shashes(algs, ARRAY_SIZE(algs));
> }
> -module_init(crypto_sha256_mod_init);
> +subsys_initcall(crypto_sha256_mod_init);
This also depends on lib/crypto/sha256 which would need to be moved
as well. However, I think rather than moving lib/crypto/sha256 even
earlier, we should simply register the Crypto API sha256-arch later.
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
prev parent reply other threads:[~2025-06-09 9:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 5:50 [PATCH 1/1] Revert "crypto: run initcalls for generic implementations earlier" Herbert Xu
2025-04-29 16:41 ` Eric Biggers
2025-04-30 2:21 ` Herbert Xu
2025-04-30 3:16 ` Eric Biggers
2025-04-30 3:18 ` Herbert Xu
2025-04-30 8:17 ` [v2 PATCH] " Herbert Xu
2025-04-30 17:52 ` Eric Biggers
2025-06-05 14:29 ` Lukas Wunner
2025-06-09 9:44 ` Herbert Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aEatBjcAmPr2Yrlg@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=ebiggers@google.com \
--cc=linux-crypto@vger.kernel.org \
--cc=lukas@wunner.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox