]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: testmgr - remove panic_on_fail
authorEric Biggers <ebiggers@google.com>
Mon, 5 May 2025 20:33:40 +0000 (13:33 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 12 May 2025 05:32:53 +0000 (13:32 +0800)
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/testmgr.c

index f100be516f5266c00d29b6a7e4d1e0deb8cf5246..1c71616ae2cfa4171f62c113786a047e68d42e23 100644 (file)
@@ -45,9 +45,6 @@ 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);
@@ -5854,11 +5851,10 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 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);