All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH v3 2/7] crypto: testmgr - remove panic_on_fail
Date: Mon,  5 May 2025 13:33:40 -0700	[thread overview]
Message-ID: <20250505203345.802740-3-ebiggers@kernel.org> (raw)
In-Reply-To: <20250505203345.802740-1-ebiggers@kernel.org>

From: Eric Biggers <ebiggers@google.com>

The cryptomgr.panic_on_fail=1 kernel command-line parameter is not very
useful now that the tests have been fixed to WARN on failure, since
developers can just use panic_on_warn=1 instead.  There's no need for a
special option just for the crypto self-tests.  Remove it.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 crypto/testmgr.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index f100be516f52..1c71616ae2cf 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -43,13 +43,10 @@ MODULE_IMPORT_NS("CRYPTO_INTERNAL");
 
 static bool notests;
 module_param(notests, bool, 0644);
 MODULE_PARM_DESC(notests, "disable crypto self-tests");
 
-static bool panic_on_fail;
-module_param(panic_on_fail, bool, 0444);
-
 #ifdef CONFIG_CRYPTO_MANAGER_EXTRA_TESTS
 static bool noextratests;
 module_param(noextratests, bool, 0644);
 MODULE_PARM_DESC(noextratests, "disable expensive crypto self-tests");
 
@@ -5852,15 +5849,14 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask)
 		rc |= alg_test_descs[j].test(alg_test_descs + j, driver,
 					     type, mask);
 
 test_done:
 	if (rc) {
-		if (fips_enabled || panic_on_fail) {
+		if (fips_enabled) {
 			fips_fail_notify();
-			panic("alg: self-tests for %s (%s) failed in %s mode!\n",
-			      driver, alg,
-			      fips_enabled ? "fips" : "panic_on_fail");
+			panic("alg: self-tests for %s (%s) failed in fips mode!\n",
+			      driver, alg);
 		}
 		pr_warn("alg: self-tests for %s using %s failed (rc=%d)",
 			alg, driver, rc);
 		WARN(rc != -ENOENT,
 		     "alg: self-tests for %s using %s failed (rc=%d)",
-- 
2.49.0


  parent reply	other threads:[~2025-05-05 20:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05 20:33 [PATCH v3 0/7] Clean up the crypto testing options Eric Biggers
2025-05-05 20:33 ` [PATCH v3 1/7] crypto: tcrypt - rename CRYPTO_TEST to CRYPTO_BENCHMARK Eric Biggers
2025-05-08 12:59   ` Geert Uytterhoeven
2025-05-05 20:33 ` Eric Biggers [this message]
2025-05-05 20:33 ` [PATCH v3 3/7] crypto: testmgr - replace CRYPTO_MANAGER_DISABLE_TESTS with CRYPTO_SELFTESTS Eric Biggers
2025-06-11 11:41   ` Diederik de Haas
2025-06-11 11:41     ` Diederik de Haas
2025-06-11 16:34     ` Eric Biggers
2025-06-11 16:34       ` Eric Biggers
2025-06-13  7:57       ` Diederik de Haas
2025-06-13  7:57         ` Diederik de Haas
2025-05-05 20:33 ` [PATCH v3 4/7] crypto: testmgr - make it easier to enable the full set of tests Eric Biggers
2025-05-05 20:33 ` [PATCH v3 5/7] crypto: testmgr - rename noextratests to noslowtests Eric Biggers
2025-05-05 20:33 ` [PATCH v3 6/7] crypto: Kconfig - make CRYPTO_MANAGER a hidden symbol Eric Biggers
2025-05-05 20:33 ` [PATCH v3 7/7] crypto: testmgr - enable CRYPTO_MANAGER when CRYPTO_SELFTESTS Eric Biggers
2025-05-12  5:46 ` [PATCH v3 0/7] Clean up the crypto testing options 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=20250505203345.802740-3-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.