From: Eric Biggers <ebiggers@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH 1/1] Revert "crypto: run initcalls for generic implementations earlier"
Date: Tue, 29 Apr 2025 20:16:23 -0700 [thread overview]
Message-ID: <20250430031623.GA277467@sol.localdomain> (raw)
In-Reply-To: <aBGJR55J3hkFZvfJ@gondor.apana.org.au>
On Wed, Apr 30, 2025 at 10:21:59AM +0800, Herbert Xu wrote:
> On Tue, Apr 29, 2025 at 09:41:00AM -0700, Eric Biggers wrote:
> >
> > arch/*/lib/ should be kept at arch_initcall. It makes sense (it's arch/ code);
> > it's library code with no dependencies on any other initcalls; and it can be
>
> There aren't any direct dependencies but if you end up executing
> the code protected by those static branches things may well break.
>
> For example, fpu_state_size_dynamic() is only initialised at
> arch_initcall. So if you enable these lib/crypto static branches,
> *and* someone actually calls them early enough during arch_initcall,
> they may end up hitting the FPU code before it's been properly
> initialised.
>
> I think it's prudent to delay the initialisation of these static
> keys until later in the boot process, unless there is a demonstrated
> need for accessing them early.
>
> > use arch_initcall. (And FWIW I'll keep doing that arch/*/lib/crc*.c, even if
> > you decide to mess up arch/*/lib/crypto/.)
>
> I'm not going to touch the crc stuff.
If arch is really too early for arch/*/lib/, then subsys should be used instead.
The point is that putting different algorithms at different levels would be
confusing.
- Eric
next prev parent reply other threads:[~2025-04-30 3:16 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 [this message]
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
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=20250430031623.GA277467@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/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