linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
To: linux-crypto@vger.kernel.org
Cc: Dag Arne Osvik <osvik@ii.uib.no>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 5/7] crypto: serpent: rename module from serpent to serpent_generic
Date: Tue, 18 Oct 2011 00:03:13 +0300	[thread overview]
Message-ID: <20111017210313.13543.21354.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20111017210247.13543.75430.stgit@localhost6.localdomain6>

Rename module from serpent.ko to serpent_generic.ko and add module alias. This
is to allow assembler implementation to autoload on 'modprobe serpent'. Also
add driver_name and priority for serpent cipher.

CC: Dag Arne Osvik <osvik@ii.uib.no>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>

---

(I choose not to do serpent.c -> serpent_generic.c rename as such patch
triggers lots of checkpatch errors. I can provide rename+style fix
patches, if you want so.)
---
 crypto/Makefile  |    4 +++-
 crypto/serpent.c |    3 +++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/crypto/Makefile b/crypto/Makefile
index fa8cbbb..dac8979 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -64,7 +64,9 @@ obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish_generic.o
 obj-$(CONFIG_CRYPTO_BLOWFISH_COMMON) += blowfish_common.o
 obj-$(CONFIG_CRYPTO_TWOFISH) += twofish_generic.o
 obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o
-obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
+
+serpent_generic-y := serpent.o
+obj-$(CONFIG_CRYPTO_SERPENT) += serpent_generic.o
 obj-$(CONFIG_CRYPTO_AES) += aes_generic.o
 obj-$(CONFIG_CRYPTO_CAMELLIA) += camellia.o
 obj-$(CONFIG_CRYPTO_CAST5) += cast5.o
diff --git a/crypto/serpent.c b/crypto/serpent.c
index 867ca93..eb61630 100644
--- a/crypto/serpent.c
+++ b/crypto/serpent.c
@@ -478,6 +478,8 @@ static void serpent_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src)
 
 static struct crypto_alg serpent_alg = {
 	.cra_name		=	"serpent",
+	.cra_driver_name	=	"serpent-generic",
+	.cra_priority		=	100,
 	.cra_flags		=	CRYPTO_ALG_TYPE_CIPHER,
 	.cra_blocksize		=	SERPENT_BLOCK_SIZE,
 	.cra_ctxsize		=	sizeof(struct serpent_ctx),
@@ -588,3 +590,4 @@ MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Serpent and tnepres (kerneli compatible serpent reversed) Cipher Algorithm");
 MODULE_AUTHOR("Dag Arne Osvik <osvik@ii.uib.no>");
 MODULE_ALIAS("tnepres");
+MODULE_ALIAS("serpent");

  parent reply	other threads:[~2011-10-17 21:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 21:02 [PATCH 0/7] crypto: add SSE2-x86_64/i586 implementation of Serpent cipher Jussi Kivilinna
2011-10-17 21:02 ` [PATCH 1/7] crypto: testmgr: add new serpent test vectors Jussi Kivilinna
2011-10-17 21:02 ` [PATCH 2/7] crypto: tcrypt: add test_acipher_speed Jussi Kivilinna
2011-10-17 21:03 ` [PATCH 3/7] crypto: tcrypt: add serpent speed tests Jussi Kivilinna
2011-10-17 21:03 ` [PATCH 4/7] crypto: serpent: export common functions for x86_64/i386-sse2 assembler implementations Jussi Kivilinna
2011-10-17 21:03 ` Jussi Kivilinna [this message]
2011-10-17 21:03 ` [PATCH 6/7] crypto: serpent: add 8-way parallel x86_64/SSE2 assembler implementation Jussi Kivilinna
2011-11-09  3:44   ` Herbert Xu
2011-10-17 21:03 ` [PATCH 7/7] crypto: serpent: add 4-way parallel i586/SSE2 " Jussi Kivilinna

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=20111017210313.13543.21354.stgit@localhost6.localdomain6 \
    --to=jussi.kivilinna@mbnet.fi \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=osvik@ii.uib.no \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).