From: Steffen Klassert <steffen.klassert@secunet.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>, linux-crypto@vger.kernel.org
Subject: [RFC] [PATCH 5/5] tcrypt: Test algorithms by name
Date: Mon, 8 Jun 2009 09:12:46 +0200 [thread overview]
Message-ID: <20090608071246.GW20366@secunet.com> (raw)
In-Reply-To: <20090608070749.GR20366@secunet.com>
This adds the 'alg' module parameter to be able to test an
algorithm by name. If the algorithm type is not ad-hoc
clear for a algorithm (e.g. pcrypt, cryptd) it is possilbe
to set the algorithm type with the 'type' module parameter.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
crypto/tcrypt.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index c3c9124..9d5b33c 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -44,6 +44,8 @@
*/
static unsigned int sec;
+static char *alg = NULL;
+static u32 type;
static int mode;
static char *tvmem[TVMEMSIZE];
@@ -864,6 +866,11 @@ static void do_test(int m)
}
}
+static void do_alg_test(const char *alg, u32 type)
+{
+ crypto_has_alg(alg, type, CRYPTO_ALG_TYPE_MASK);
+}
+
static int __init tcrypt_mod_init(void)
{
int err = -ENOMEM;
@@ -875,7 +882,10 @@ static int __init tcrypt_mod_init(void)
goto err_free_tv;
}
- do_test(mode);
+ if (alg)
+ do_alg_test(alg, type);
+ else
+ do_test(mode);
/* We intentionaly return -EAGAIN to prevent keeping
* the module. It does all its work from init()
@@ -901,6 +911,8 @@ static void __exit tcrypt_mod_fini(void) { }
module_init(tcrypt_mod_init);
module_exit(tcrypt_mod_fini);
+module_param(alg, charp, 0);
+module_param(type, uint, 0);
module_param(mode, int, 0);
module_param(sec, uint, 0);
MODULE_PARM_DESC(sec, "Length in seconds of speed tests "
--
1.5.4.2
next prev parent reply other threads:[~2009-06-08 7:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-08 7:07 [RFC] [PATCH 0/5] Parallel IPsec v4 Steffen Klassert
2009-06-08 7:08 ` [RFC] [PATCH 1/5] padata: generic interface for parallel processing Steffen Klassert
2009-06-08 7:10 ` [RFC] [PATCH 2/5] pcrypt: Add pcrypt crypto parallelization wrapper Steffen Klassert
2009-06-19 12:21 ` Herbert Xu
2009-06-23 6:21 ` Steffen Klassert
2009-06-19 12:29 ` Herbert Xu
2009-06-23 8:29 ` Steffen Klassert
2009-06-23 8:34 ` Herbert Xu
2009-06-23 9:14 ` Steffen Klassert
2009-06-23 9:18 ` Herbert Xu
2009-06-23 10:19 ` Steffen Klassert
2009-06-23 10:19 ` Herbert Xu
2009-06-08 7:10 ` [RFC] [PATCH 3/5] eseqiv: Add support for aead algorithms Steffen Klassert
2009-06-25 10:46 ` Herbert Xu
2009-06-29 11:12 ` Steffen Klassert
2009-06-08 7:11 ` [RFC] [PATCH 4/5] authenc: Check if the IV is already added to the scatterlist Steffen Klassert
2009-06-08 7:12 ` Steffen Klassert [this message]
2009-06-19 10:53 ` [RFC] [PATCH 5/5] tcrypt: Test algorithms by name Herbert Xu
2009-06-19 10:56 ` Herbert Xu
2009-06-19 11:40 ` [PATCH] " Steffen Klassert
2009-06-19 11:47 ` Herbert Xu
2009-06-19 12:38 ` Herbert Xu
2009-06-23 6:04 ` Steffen Klassert
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=20090608071246.GW20366@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@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.