mirror of
https://github.com/torvalds/linux.git
synced 2025-08-15 14:11:42 +02:00
crypto: testmgr - replace CRYPTO_MANAGER_DISABLE_TESTS with CRYPTO_SELFTESTS
The negative-sense of CRYPTO_MANAGER_DISABLE_TESTS is a longstanding mistake that regularly causes confusion. Especially bad is that you can have CRYPTO=n && CRYPTO_MANAGER_DISABLE_TESTS=n, which is ambiguous. Replace CRYPTO_MANAGER_DISABLE_TESTS with CRYPTO_SELFTESTS which has the expected behavior. The tests continue to be disabled by default. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
d469eaed22
commit
40b9969796
18 changed files with 41 additions and 40 deletions
|
@ -275,7 +275,7 @@ static struct crypto_larval *crypto_alloc_test_larval(struct crypto_alg *alg)
|
|||
struct crypto_larval *larval;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER) ||
|
||||
IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) ||
|
||||
!IS_ENABLED(CONFIG_CRYPTO_SELFTESTS) ||
|
||||
(alg->cra_flags & CRYPTO_ALG_INTERNAL))
|
||||
return NULL; /* No self-test needed */
|
||||
|
||||
|
@ -1059,7 +1059,7 @@ static void __init crypto_start_tests(void)
|
|||
if (!IS_BUILTIN(CONFIG_CRYPTO_ALGAPI))
|
||||
return;
|
||||
|
||||
if (IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS))
|
||||
if (!IS_ENABLED(CONFIG_CRYPTO_SELFTESTS))
|
||||
return;
|
||||
|
||||
set_crypto_boot_test_finished();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue