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] crypto: testmgr - Move crypto_simd_disabled_for_test out
Date: Tue, 11 Jan 2022 13:43:58 -0800 [thread overview]
Message-ID: <Yd36HsgI+ya6P7RF@gmail.com> (raw)
In-Reply-To: <Yd0jA4VOjysrdOu7@gondor.apana.org.au>
On Tue, Jan 11, 2022 at 05:26:11PM +1100, Herbert Xu wrote:
> As testmgr is part of cryptomgr which was designed to be unloadable
> as a module, it shouldn't export any symbols for other crypto
> modules to use as that would prevent it from being unloaded. All
> its functionality is meant to be accessed through notifiers.
>
> The symbol crypto_simd_disabled_for_test was added to testmgr
> which caused it to be pinned as a module if its users were also
> loaded. This patch moves it out of testmgr and into crypto/simd.c
> so cryptomgr can again be unloaded and replaced on demand.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
> diff --git a/crypto/simd.c b/crypto/simd.c
> index edaa479a1ec5..2027d747b746 100644
> --- a/crypto/simd.c
> +++ b/crypto/simd.c
> @@ -47,6 +47,11 @@ struct simd_skcipher_ctx {
> struct cryptd_skcipher *cryptd_tfm;
> };
>
> +#ifdef CONFIG_CRYPTO_MANAGER_EXTRA_TESTS
> +DEFINE_PER_CPU(bool, crypto_simd_disabled_for_test);
> +EXPORT_PER_CPU_SYMBOL_GPL(crypto_simd_disabled_for_test);
> +#endif
> +
> static int simd_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key,
> unsigned int key_len)
> {
It doesn't look like all the users of crypto_simd_usable() select CRYPTO_SIMD.
So this will cause a build break in some configurations.
Maybe CRYPTO_MANAGER_EXTRA_TESTS should select CRYPTO_SIMD?
- Eric
next prev parent reply other threads:[~2022-01-11 21:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 6:26 [PATCH] crypto: testmgr - Move crypto_simd_disabled_for_test out Herbert Xu
2022-01-11 21:43 ` Eric Biggers [this message]
2022-01-12 0:58 ` Herbert Xu
2022-01-14 6:40 ` [v2 PATCH] " Herbert Xu
2022-01-14 21:57 ` Eric Biggers
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=Yd36HsgI+ya6P7RF@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).