Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1391010 > unrolled thread
| Started by | "Richard W.M. Jones" <rjones@redhat.com> |
|---|---|
| First post | 2016-04-29 13:10 +0200 |
| Last post | 2016-05-03 09:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2] crypto: Add a flag allowing the self-tests to be disabled at runtime. "Richard W.M. Jones" <rjones@redhat.com> - 2016-04-29 13:10 +0200
Re: [PATCH v2] crypto: Add a flag allowing the self-tests to be disabled at runtime. Herbert Xu <herbert@gondor.apana.org.au> - 2016-05-03 09:40 +0200
| From | "Richard W.M. Jones" <rjones@redhat.com> |
|---|---|
| Date | 2016-04-29 13:10 +0200 |
| Subject | [PATCH v2] crypto: Add a flag allowing the self-tests to be disabled at runtime. |
| Message-ID | <rtet4-4St-29@gated-at.bofh.it> |
Running self-tests for a short-lived KVM VM takes 28ms on my laptop.
This commit adds a flag 'cryptomgr.notests' which allows them to be
disabled.
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
---
Documentation/kernel-parameters.txt | 3 +++
crypto/testmgr.c | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 0b3de80..d4d5fb7 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -826,6 +826,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
It will be ignored when crashkernel=X,high is not used
or memory reserved is below 4G.
+ cryptomgr.notests
+ [KNL] Disable crypto self-tests
+
cs89x0_dma= [HW,NET]
Format: <dma>
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index b86883a..5c0664d 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -35,6 +35,10 @@
#include "internal.h"
+static bool notests;
+module_param(notests, bool, 0644);
+MODULE_PARM_DESC(notests, "disable crypto self-tests");
+
#ifdef CONFIG_CRYPTO_MANAGER_DISABLE_TESTS
/* a perfect nop */
@@ -3868,6 +3872,11 @@ int alg_test(const char *driver, const char *alg, u32 type, u32 mask)
int j;
int rc;
+ if (notests) {
+ printk_once(KERN_INFO "alg: self-tests disabled\n");
+ return 0;
+ }
+
alg_test_descs_check_order();
if ((type & CRYPTO_ALG_TYPE_MASK) == CRYPTO_ALG_TYPE_CIPHER) {
--
2.7.4
[toc] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2016-05-03 09:40 +0200 |
| Subject | Re: [PATCH v2] crypto: Add a flag allowing the self-tests to be disabled at runtime. |
| Message-ID | <ruD61-3HL-15@gated-at.bofh.it> |
| In reply to | #1391010 |
On Fri, Apr 29, 2016 at 12:03:04PM +0100, Richard W.M. Jones wrote: > Running self-tests for a short-lived KVM VM takes 28ms on my laptop. > This commit adds a flag 'cryptomgr.notests' which allows them to be > disabled. > > Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Please address the conflict with FIPS mode. Thanks, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web