[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250418145945.GA1890@quark.localdomain>
Date: Fri, 18 Apr 2025 07:59:45 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Daniel Palmer <daniel@...f.com>
Cc: herbert@...dor.apana.org.au, davem@...emloft.net, Jason@...c4.com,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
Daniel Palmer <daniel@...ngy.jp>
Subject: Re: [PATCH] lib/crypto: blake2s: Disable self test if CONFIG_CRYPTO
isn't enabled
On Fri, Apr 18, 2025 at 09:02:16PM +0900, Daniel Palmer wrote:
> From: Daniel Palmer <daniel@...ngy.jp>
>
> Currently CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is used to remove
> the self test code. CONFIG_CRYPTO_MANAGER_DISABLE_TESTS depends on
> CONFIG_CRYPTO so its impossible to disable the self test without
> enabling CONFIG_CRYPTO.
>
> If you don't want CONFIG_CRYPTO you probably don't want self tests
> so remove the self tests in that case too.
>
> Fixes: 66d7fb94e4ff ("crypto: blake2s - generic C library implementation and selftest")
>
> Signed-off-by: Daniel Palmer <daniel@...ngy.jp>
> ---
> lib/crypto/blake2s.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Acked-by: Eric Biggers <ebiggers@...nel.org>
This is okay as a quick fix, but really the lib/crypto/ tests should be
refactored into KUnit tests that aren't dependent on CRYPTO. FWIW, I recently
fixed this for the CRC functions: lib/tests/crc_kunit.c.
- Eric
Powered by blists - more mailing lists