From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
Vladis Dronov <vdronov@redhat.com>,
Simo Sorce <ssorce@redhat.com>
Subject: Re: [PATCH] crypto: api - Fix built-in testing dependency failures
Date: Tue, 14 Sep 2021 11:28:58 +0800 [thread overview]
Message-ID: <20210914032858.GA19339@gondor.apana.org.au> (raw)
In-Reply-To: <YT+VYx7OKELJafYz@sol.localdomain>
On Mon, Sep 13, 2021 at 11:16:03AM -0700, Eric Biggers wrote:
>
> Are there any specific examples that you could give?
The one that triggered this was ecdh-nist-p256-generic, which
calls into drbg. Both ecdh and drbg are at level subsys_initcall
so the order between them is random.
Beyond this, obviously we have already moved many algorithms
ot subsys_initcall precisely for this purpose and with this
patch, they can all be moved back to module_init.
> 'tested' is set before the algorithm has actually been tested, and it sounds
> like the same as CRYPTO_ALG_TESTED which already exists. Maybe it should be
> called something else, like 'test_started'?
Sure, I can rename that.
> Is there a way to continue iterating from the previous algorithm, so that this
> doesn't take quadratic time?
It's certainly possible to optimise this, but I'm not inclined
to do it unless someone can show me that it's a real issue :)
The simplest way to optimise this would be to create a separate
list for the test larvae.
> A comment explaining why the tests aren't run until late_initcall would be
> helpful. People shouldn't have to dig through commit messages to understand the
> code.
Sure.
> Also, did you check whether there is anything that relies on the crypto API
> being available before or during late_initcall? That wouldn't work with this
> new approach, right?
The patch is supposed to deal with that scenario by starting the
test on-demand should someone request for it before late_initcall.
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
next prev parent reply other threads:[~2021-09-14 3:29 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 7:12 [PATCH] crypto: api - Fix built-in testing dependency failures Herbert Xu
2021-09-13 18:16 ` Eric Biggers
2021-09-14 3:28 ` Herbert Xu [this message]
2021-09-17 0:26 ` [v2 PATCH] " Herbert Xu
2021-09-28 18:32 ` Nathan Chancellor
2021-10-01 5:50 ` Herbert Xu
2021-10-01 10:58 ` Naresh Kamboju
2021-10-01 18:01 ` Nathan Chancellor
2021-10-03 0:28 ` Herbert Xu
2021-10-06 2:33 ` Nathan Chancellor
2021-10-19 13:28 ` [PATCH] crypto: api - Do not create test larvals if manager is disabled Herbert Xu
2021-11-02 15:41 ` Geert Uytterhoeven
2021-11-04 7:28 ` Damien Le Moal
2021-11-04 7:58 ` Geert Uytterhoeven
2021-11-04 8:05 ` Damien Le Moal
2021-11-04 12:16 ` Herbert Xu
2021-11-04 13:11 ` Geert Uytterhoeven
2021-11-04 13:30 ` Herbert Xu
2021-11-04 15:18 ` Ido Schimmel
2021-11-05 7:26 ` crypto: api - Fix boot-up crash when crypto " Herbert Xu
2021-11-05 14:33 ` Ido Schimmel
2021-11-05 18:00 ` Geert Uytterhoeven
2021-10-26 16:33 ` [v2 PATCH] crypto: api - Fix built-in testing dependency failures Guenter Roeck
2021-10-27 2:59 ` Herbert Xu
2021-10-27 3:48 ` Guenter Roeck
2021-11-06 3:47 ` Herbert Xu
2021-11-06 14:55 ` Guenter Roeck
2021-12-22 10:22 ` Uwe Kleine-König
2021-12-22 10:37 ` Uwe Kleine-König
2021-12-29 2:05 ` Herbert Xu
2021-12-29 11:05 ` Uwe Kleine-König
2022-03-16 1:10 ` Herbert Xu
2022-03-16 16:37 ` Uwe Kleine-König
2022-03-16 21:44 ` Uwe Kleine-König
2022-03-16 22:38 ` Herbert Xu
2022-03-16 22:55 ` [PATCH] crypto: arm/aes-neonbs-cbc - Select generic cbc and aes Herbert Xu
2022-03-17 7:11 ` Uwe Kleine-König
2022-03-17 9:16 ` Philipp Zabel
2022-03-17 22:15 ` 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=20210914032858.GA19339@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=ebiggers@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=ssorce@redhat.com \
--cc=vdronov@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).