linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 2/6] [crypto] geode aes: consistent IV copy
  2007-10-12 15:21 [RFC 0/6] small geode cleanup + fallback linux-crypto
@ 2007-10-11 14:33 ` Sebastian Siewior
  2007-10-11 15:00 ` [RFC 3/6] [crypto] geode: relax in busy loop and care about return value Sebastian Siewior
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Sebastian Siewior @ 2007-10-11 14:33 UTC (permalink / raw)
  To: linux-crypto

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]


It is enough if the IV is copied before and after the while loop.
With DM-Crypt is seems not be required to save the IV after encrytion
because a new IV is used in the request (dunno about other users).
It is not save to load the IV within while loop and not save afterwards
because we will end up with the wrong IV if the request consists of more 
than one page.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
---
 drivers/crypto/geode-aes.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 859476c38eb7658240d647df03ec0fd513e3bfa5.diff --]
[-- Type: text/x-patch; name="859476c38eb7658240d647df03ec0fd513e3bfa5.diff", Size: 1482 bytes --]

diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 7c6f13f..8bcd6d5 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -227,6 +227,7 @@ geode_cbc_decrypt(struct blkcipher_desc *desc,
 
 	blkcipher_walk_init(&walk, dst, src, nbytes);
 	err = blkcipher_walk_virt(desc, &walk);
+	memcpy(op->iv, walk.iv, AES_IV_LENGTH);
 
 	while((nbytes = walk.nbytes)) {
 		op->src = walk.src.virt.addr,
@@ -235,16 +236,13 @@ geode_cbc_decrypt(struct blkcipher_desc *desc,
 		op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
 		op->dir = AES_DIR_DECRYPT;
 
-		memcpy(op->iv, walk.iv, AES_IV_LENGTH);
-
 		ret = geode_aes_crypt(op);
 
-		memcpy(walk.iv, op->iv, AES_IV_LENGTH);
 		nbytes -= ret;
-
 		err = blkcipher_walk_done(desc, &walk, nbytes);
 	}
 
+	memcpy(walk.iv, op->iv, AES_IV_LENGTH);
 	return err;
 }
 
@@ -259,6 +257,7 @@ geode_cbc_encrypt(struct blkcipher_desc *desc,
 
 	blkcipher_walk_init(&walk, dst, src, nbytes);
 	err = blkcipher_walk_virt(desc, &walk);
+	memcpy(op->iv, walk.iv, AES_IV_LENGTH);
 
 	while((nbytes = walk.nbytes)) {
 		op->src = walk.src.virt.addr,
@@ -267,13 +266,12 @@ geode_cbc_encrypt(struct blkcipher_desc *desc,
 		op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
 		op->dir = AES_DIR_ENCRYPT;
 
-		memcpy(op->iv, walk.iv, AES_IV_LENGTH);
-
 		ret = geode_aes_crypt(op);
 		nbytes -= ret;
 		err = blkcipher_walk_done(desc, &walk, nbytes);
 	}
 
+	memcpy(walk.iv, op->iv, AES_IV_LENGTH);
 	return err;
 }
 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC 3/6] [crypto] geode: relax in busy loop and care about return value
  2007-10-12 15:21 [RFC 0/6] small geode cleanup + fallback linux-crypto
  2007-10-11 14:33 ` [RFC 2/6] [crypto] geode aes: consistent IV copy Sebastian Siewior
@ 2007-10-11 15:00 ` Sebastian Siewior
  2007-10-12 12:27 ` [RFC 5/6] [crypto] geode add fallback for unsupported modes Sebastian Siewior
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Sebastian Siewior @ 2007-10-11 15:00 UTC (permalink / raw)
  To: linux-crypto

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]


The code waits in a busy loop until the hardware finishes the encryption
or decryption process. This wants a cpu_relax() :)
The busy loop finishes either if the encryption is done or if the counter
is zero. If the latter is true than the hardware failed. Since this
should not happen, leave a BUG() statement to notice this.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
---
 drivers/crypto/geode-aes.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: d1f8c3225b221c7a3efd0fd07ce6a7a3ff09f8e6.diff --]
[-- Type: text/x-patch; name="d1f8c3225b221c7a3efd0fd07ce6a7a3ff09f8e6.diff", Size: 1059 bytes --]

diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 8bcd6d5..99ea594 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -88,9 +88,10 @@ do_crypt(void *src, void *dst, int len, u32 flags)
 	/* Start the operation */
 	iowrite32(AES_CTRL_START | flags, _iobase + AES_CTRLA_REG);
 
-	do
+	do {
 		status = ioread32(_iobase + AES_INTR_REG);
-	while(!(status & AES_INTRA_PENDING) && --counter);
+		cpu_relax();
+	} while(!(status & AES_INTRA_PENDING) && --counter);
 
 	/* Clear the event */
 	iowrite32((status & 0xFF) | AES_INTRA_PENDING, _iobase + AES_INTR_REG);
@@ -102,6 +103,7 @@ geode_aes_crypt(struct geode_aes_op *op)
 {
 	u32 flags = 0;
 	unsigned long iflags;
+	int ret;
 
 	if (op->len == 0)
 		return 0;
@@ -131,7 +133,8 @@ geode_aes_crypt(struct geode_aes_op *op)
 		_writefield(AES_WRITEKEY0_REG, op->key);
 	}
 
-	do_crypt(op->src, op->dst, op->len, flags);
+	ret = do_crypt(op->src, op->dst, op->len, flags);
+	BUG_ON(ret);
 
 	if (op->mode == AES_MODE_CBC)
 		_readfield(AES_WRITEIV0_REG, op->iv);

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC 5/6] [crypto] geode add fallback for unsupported modes.
  2007-10-12 15:21 [RFC 0/6] small geode cleanup + fallback linux-crypto
  2007-10-11 14:33 ` [RFC 2/6] [crypto] geode aes: consistent IV copy Sebastian Siewior
  2007-10-11 15:00 ` [RFC 3/6] [crypto] geode: relax in busy loop and care about return value Sebastian Siewior
@ 2007-10-12 12:27 ` Sebastian Siewior
  2007-10-12 12:38 ` [RFC 1/6] [crypto] AES: move common defines into a header file Sebastian Siewior
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Sebastian Siewior @ 2007-10-12 12:27 UTC (permalink / raw)
  To: linux-crypto

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]


The Geode AES crypto engine supports only 128 bit long key. This
patch adds fallback for other key sizes which are required by the
AES standard.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
---
 drivers/crypto/geode-aes.c |  188 +++++++++++++++++++++++++++++++++++++++-----
 drivers/crypto/geode-aes.h |    6 ++
 2 files changed, 173 insertions(+), 21 deletions(-)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 06a8173b0f5ca56c5586ba6919f4be56f26546a2.diff --]
[-- Type: text/x-patch; name="06a8173b0f5ca56c5586ba6919f4be56f26546a2.diff", Size: 9707 bytes --]

diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index da6164a..761d600 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -118,14 +118,82 @@ static int
 geode_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int len)
 {
 	struct geode_aes_op *op = crypto_tfm_ctx(tfm);
+	unsigned int type;
+	unsigned int ret;
 
-	if (len != AES_KEY_LENGTH) {
+	op->keylen = len;
+
+	if (len == AES_KEY_LENGTH) {
+		memcpy(op->key, key, len);
+		return 0;
+	}
+
+	if (len != 24 && len != 32) {
+		/* not supported at all */
 		tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
 		return -EINVAL;
 	}
 
-	memcpy(op->key, key, len);
-	return 0;
+	/*
+	 * The requested key size is not supported by HW, do a fallback
+	 */
+
+	type = tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK;
+
+	/* propagate requested flags to the fallback driver */
+	op->fallback.blk->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK;
+	op->fallback.blk->base.crt_flags |= (tfm->crt_flags & CRYPTO_TFM_REQ_MASK);
+
+	if (type == CRYPTO_ALG_TYPE_BLKCIPHER) {
+		ret = crypto_blkcipher_setkey(op->fallback.blk, key, len);
+
+	} else if (type == CRYPTO_ALG_TYPE_CIPHER) {
+		ret = crypto_cipher_setkey(op->fallback.cip, key, len);
+
+	} else {
+		printk(KERN_ERR "Neither a cipher nor a block cipher. %x / %x\n",
+				type, tfm->crt_flags);
+		return -EINVAL;
+	}
+
+	if (ret) {
+		tfm->crt_flags &= ~CRYPTO_TFM_RES_MASK;
+		tfm->crt_flags |= (op->fallback.blk->base.crt_flags & CRYPTO_TFM_RES_MASK);
+	}
+	return ret;
+}
+
+static int fallback_blk_dec(struct blkcipher_desc *desc,
+		struct scatterlist *dst, struct scatterlist *src,
+		unsigned int nbytes)
+{
+	unsigned int ret;
+	struct crypto_blkcipher *tfm;
+	struct geode_aes_op *op = crypto_blkcipher_ctx(desc->tfm);
+
+	tfm = desc->tfm;
+	desc->tfm = op->fallback.blk;
+
+	ret = crypto_blkcipher_decrypt(desc, dst, src, nbytes);
+
+	desc->tfm = tfm;
+	return ret;
+}
+static int fallback_blk_enc(struct blkcipher_desc *desc,
+		struct scatterlist *dst, struct scatterlist *src,
+		unsigned int nbytes)
+{
+	unsigned int ret;
+	struct crypto_blkcipher *tfm;
+	struct geode_aes_op *op = crypto_blkcipher_ctx(desc->tfm);
+
+	tfm = desc->tfm;
+	desc->tfm = op->fallback.blk;
+
+	ret = crypto_blkcipher_encrypt(desc, dst, src, nbytes);
+
+	desc->tfm = tfm;
+	return ret;
 }
 
 static void
@@ -133,8 +201,10 @@ geode_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
 {
 	struct geode_aes_op *op = crypto_tfm_ctx(tfm);
 
-	if ((out == NULL) || (in == NULL))
+	if (unlikely(op->keylen != 16)) {
+		crypto_cipher_encrypt_one(op->fallback.cip, out, in);
 		return;
+	}
 
 	op->src = (void *) in;
 	op->dst = (void *) out;
@@ -152,8 +222,10 @@ geode_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
 {
 	struct geode_aes_op *op = crypto_tfm_ctx(tfm);
 
-	if ((out == NULL) || (in == NULL))
+	if (unlikely(op->keylen != 16)) {
+		crypto_cipher_decrypt_one(op->fallback.cip, out, in);
 		return;
+	}
 
 	op->src = (void *) in;
 	op->dst = (void *) out;
@@ -165,21 +237,76 @@ geode_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
 	geode_aes_crypt(op);
 }
 
+static int fallback_init(struct crypto_tfm *tfm)
+{
+	const char *name = tfm->__crt_alg->cra_name;
+	unsigned int type;
+	struct geode_aes_op *op = crypto_tfm_ctx(tfm);
+
+	type = tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK;
+
+	if (type == CRYPTO_ALG_TYPE_BLKCIPHER) {
+		op->fallback.blk = crypto_alloc_blkcipher(name, 0,
+				CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
+
+	} else if (type == CRYPTO_ALG_TYPE_CIPHER) {
+		op->fallback.cip = crypto_alloc_cipher(name, 0,
+				CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
+	} else {
+		printk(KERN_ERR "%s is neither a cipher nor a block cipher: %x\n",
+				name, type);
+		return -EINVAL;
+	}
+
+	/*
+	 * cipher / blkcipher, this is the same pointer for both. One check is
+	 * enough
+	 */
+	if (IS_ERR(op->fallback.blk)) {
+		printk(KERN_ERR "Error allocating fallback algo %s\n", name);
+		return PTR_ERR(op->fallback.blk);
+	}
+
+	return 0;
+}
+
+static void fallback_exit(struct crypto_tfm *tfm)
+{
+	unsigned int type;
+	struct geode_aes_op *op = crypto_tfm_ctx(tfm);
+
+	type = tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK;
+	if (type == CRYPTO_ALG_TYPE_BLKCIPHER) {
+		crypto_free_blkcipher(op->fallback.blk);
+		op->fallback.blk = NULL;
+		return;
+
+	} else if (type == CRYPTO_ALG_TYPE_CIPHER) {
+		crypto_free_cipher(op->fallback.cip);
+		op->fallback.cip = NULL;
+		return;
+	}
+
+	WARN_ON(1);
+}
 
 static struct crypto_alg geode_alg = {
 	.cra_name               =       "aes",
-	.cra_driver_name	=       "geode-aes-128",
+	.cra_driver_name	=       "geode-aes",
 	.cra_priority           =       300,
 	.cra_alignmask          =       15,
-	.cra_flags		=	CRYPTO_ALG_TYPE_CIPHER,
+	.cra_flags		=	CRYPTO_ALG_TYPE_CIPHER |
+					CRYPTO_ALG_NEED_FALLBACK,
+	.cra_init               =       fallback_init,
+	.cra_exit               =       fallback_exit,
 	.cra_blocksize		=	AES_MIN_BLOCK_SIZE,
 	.cra_ctxsize		=	sizeof(struct geode_aes_op),
 	.cra_module		=	THIS_MODULE,
 	.cra_list		=	LIST_HEAD_INIT(geode_alg.cra_list),
 	.cra_u			=	{
 		.cipher = {
-			.cia_min_keysize	=  AES_KEY_LENGTH,
-			.cia_max_keysize	=  AES_KEY_LENGTH,
+			.cia_min_keysize	=  AES_MIN_KEY_SIZE,
+			.cia_max_keysize	=  AES_MAX_KEY_SIZE,
 			.cia_setkey		=  geode_setkey,
 			.cia_encrypt		=  geode_encrypt,
 			.cia_decrypt		=  geode_decrypt
@@ -196,6 +323,9 @@ geode_cbc_decrypt(struct blkcipher_desc *desc,
 	struct blkcipher_walk walk;
 	int err, ret;
 
+	if (unlikely(op->keylen != 16))
+		return fallback_blk_dec(desc, dst, src, nbytes);
+
 	blkcipher_walk_init(&walk, dst, src, nbytes);
 	err = blkcipher_walk_virt(desc, &walk);
 	memcpy(op->iv, walk.iv, AES_IV_LENGTH);
@@ -226,6 +356,9 @@ geode_cbc_encrypt(struct blkcipher_desc *desc,
 	struct blkcipher_walk walk;
 	int err, ret;
 
+	if (unlikely(op->keylen != 16))
+		return fallback_blk_enc(desc, dst, src, nbytes);
+
 	blkcipher_walk_init(&walk, dst, src, nbytes);
 	err = blkcipher_walk_virt(desc, &walk);
 	memcpy(op->iv, walk.iv, AES_IV_LENGTH);
@@ -248,9 +381,12 @@ geode_cbc_encrypt(struct blkcipher_desc *desc,
 
 static struct crypto_alg geode_cbc_alg = {
 	.cra_name		=	"cbc(aes)",
-	.cra_driver_name	=	"cbc-aes-geode-128",
-	.cra_priority		=	400,
-	.cra_flags		=	CRYPTO_ALG_TYPE_BLKCIPHER,
+	.cra_driver_name	=	"cbc-aes-geode",
+	.cra_priority		=	300,
+	.cra_flags		=	CRYPTO_ALG_TYPE_BLKCIPHER |
+					CRYPTO_ALG_NEED_FALLBACK,
+	.cra_init               =       fallback_init,
+	.cra_exit               =       fallback_exit,
 	.cra_blocksize		=	AES_MIN_BLOCK_SIZE,
 	.cra_ctxsize		=	sizeof(struct geode_aes_op),
 	.cra_alignmask		=	15,
@@ -259,8 +395,8 @@ static struct crypto_alg geode_cbc_alg = {
 	.cra_list		=	LIST_HEAD_INIT(geode_cbc_alg.cra_list),
 	.cra_u			=	{
 		.blkcipher = {
-			.min_keysize		=	AES_KEY_LENGTH,
-			.max_keysize		=	AES_KEY_LENGTH,
+			.min_keysize		=	AES_MIN_KEY_SIZE,
+			.max_keysize		=	AES_MAX_KEY_SIZE,
 			.setkey			=	geode_setkey,
 			.encrypt		=	geode_cbc_encrypt,
 			.decrypt		=	geode_cbc_decrypt,
@@ -278,6 +414,9 @@ geode_ecb_decrypt(struct blkcipher_desc *desc,
 	struct blkcipher_walk walk;
 	int err, ret;
 
+	if (unlikely(op->keylen != 16))
+		return fallback_blk_dec(desc, dst, src, nbytes);
+
 	blkcipher_walk_init(&walk, dst, src, nbytes);
 	err = blkcipher_walk_virt(desc, &walk);
 
@@ -305,6 +444,9 @@ geode_ecb_encrypt(struct blkcipher_desc *desc,
 	struct blkcipher_walk walk;
 	int err, ret;
 
+	if (unlikely(op->keylen != 16))
+		return fallback_blk_enc(desc, dst, src, nbytes);
+
 	blkcipher_walk_init(&walk, dst, src, nbytes);
 	err = blkcipher_walk_virt(desc, &walk);
 
@@ -325,9 +467,12 @@ geode_ecb_encrypt(struct blkcipher_desc *desc,
 
 static struct crypto_alg geode_ecb_alg = {
 	.cra_name		=	"ecb(aes)",
-	.cra_driver_name	=	"ecb-aes-geode-128",
-	.cra_priority		=	400,
-	.cra_flags		=	CRYPTO_ALG_TYPE_BLKCIPHER,
+	.cra_driver_name	=	"ecb-aes-geode",
+	.cra_priority		=	300,
+	.cra_flags		=	CRYPTO_ALG_TYPE_BLKCIPHER |
+					CRYPTO_ALG_NEED_FALLBACK,
+	.cra_init               =       fallback_init,
+	.cra_exit               =       fallback_exit,
 	.cra_blocksize		=	AES_MIN_BLOCK_SIZE,
 	.cra_ctxsize		=	sizeof(struct geode_aes_op),
 	.cra_alignmask		=	15,
@@ -336,8 +481,8 @@ static struct crypto_alg geode_ecb_alg = {
 	.cra_list		=	LIST_HEAD_INIT(geode_ecb_alg.cra_list),
 	.cra_u			=	{
 		.blkcipher = {
-			.min_keysize		=	AES_KEY_LENGTH,
-			.max_keysize		=	AES_KEY_LENGTH,
+			.min_keysize		=	AES_MIN_KEY_SIZE,
+			.max_keysize		=	AES_MAX_KEY_SIZE,
 			.setkey			=	geode_setkey,
 			.encrypt		=	geode_ecb_encrypt,
 			.decrypt		=	geode_ecb_decrypt,
@@ -368,7 +513,7 @@ geode_aes_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	if ((ret = pci_enable_device(dev)))
 		return ret;
 
-	if ((ret = pci_request_regions(dev, "geode-aes-128")))
+	if ((ret = pci_request_regions(dev, "geode-aes")))
 		goto eenable;
 
 	_iobase = pci_iomap(dev, 0, 0);
@@ -392,7 +537,8 @@ geode_aes_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	if ((ret = crypto_register_alg(&geode_cbc_alg)))
 		goto eecb;
 
-	printk(KERN_NOTICE "geode-aes: GEODE AES engine enabled.\n");
+	printk(KERN_NOTICE "geode-aes: GEODE AES engine enabled. "
+			"Only 128-bit keys are supported by the Hardware.\n");
 	return 0;
 
  eecb:
diff --git a/drivers/crypto/geode-aes.h b/drivers/crypto/geode-aes.h
index 2f1d559..14cc763 100644
--- a/drivers/crypto/geode-aes.h
+++ b/drivers/crypto/geode-aes.h
@@ -66,6 +66,12 @@ struct geode_aes_op {
 
 	u8 key[AES_KEY_LENGTH];
 	u8 iv[AES_IV_LENGTH];
+
+	union {
+		struct crypto_blkcipher *blk;
+		struct crypto_cipher *cip;
+	} fallback;
+	u32 keylen;
 };
 
 #endif

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC 1/6] [crypto] AES: move common defines into a header file
  2007-10-12 15:21 [RFC 0/6] small geode cleanup + fallback linux-crypto
                   ` (2 preceding siblings ...)
  2007-10-12 12:27 ` [RFC 5/6] [crypto] geode add fallback for unsupported modes Sebastian Siewior
@ 2007-10-12 12:38 ` Sebastian Siewior
  2007-10-12 12:47 ` [RFC 4/6] [crypto] geode: move defines into a headerfile Sebastian Siewior
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Sebastian Siewior @ 2007-10-12 12:38 UTC (permalink / raw)
  To: linux-crypto

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]


This three defines are used in every AES related implementation.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
---
 arch/i386/crypto/aes.c       |    4 +---
 arch/s390/crypto/aes_s390.c  |    7 +------
 arch/x86_64/crypto/aes.c     |    6 +-----
 crypto/aes.c                 |    6 +-----
 drivers/crypto/geode-aes.c   |    1 +
 drivers/crypto/padlock-aes.c |    4 +---
 include/crypto/aes.h         |   15 +++++++++++++++
 7 files changed, 21 insertions(+), 22 deletions(-)
 create mode 100644 include/crypto/aes.h

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: d9f0e2329449a5bc2ec784dfd666ad09ae150f0e.diff --]
[-- Type: text/x-patch; name="d9f0e2329449a5bc2ec784dfd666ad09ae150f0e.diff", Size: 3671 bytes --]

diff --git a/arch/i386/crypto/aes.c b/arch/i386/crypto/aes.c
index 49aad93..9b0ab50 100644
--- a/arch/i386/crypto/aes.c
+++ b/arch/i386/crypto/aes.c
@@ -38,6 +38,7 @@
  */
 
 #include <asm/byteorder.h>
+#include <crypto/aes.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -48,9 +49,6 @@
 asmlinkage void aes_enc_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
 asmlinkage void aes_dec_blk(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
 
-#define AES_MIN_KEY_SIZE	16
-#define AES_MAX_KEY_SIZE	32
-#define AES_BLOCK_SIZE		16
 #define AES_KS_LENGTH		4 * AES_BLOCK_SIZE
 #define RC_LENGTH		29
 
diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c
index 3660ca6..a4eff57 100644
--- a/arch/s390/crypto/aes_s390.c
+++ b/arch/s390/crypto/aes_s390.c
@@ -16,17 +16,12 @@
  *
  */
 
+#include <crypto/aes.h>
 #include <crypto/algapi.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include "crypt_s390.h"
 
-#define AES_MIN_KEY_SIZE	16
-#define AES_MAX_KEY_SIZE	32
-
-/* data block size for all key lengths */
-#define AES_BLOCK_SIZE		16
-
 #define AES_KEYLEN_128		1
 #define AES_KEYLEN_192		2
 #define AES_KEYLEN_256		4
diff --git a/arch/x86_64/crypto/aes.c b/arch/x86_64/crypto/aes.c
index 5cdb13e..0b38a4c 100644
--- a/arch/x86_64/crypto/aes.c
+++ b/arch/x86_64/crypto/aes.c
@@ -54,6 +54,7 @@
 */
 
 #include <asm/byteorder.h>
+#include <crypto/aes.h>
 #include <linux/bitops.h>
 #include <linux/crypto.h>
 #include <linux/errno.h>
@@ -61,11 +62,6 @@
 #include <linux/module.h>
 #include <linux/types.h>
 
-#define AES_MIN_KEY_SIZE	16
-#define AES_MAX_KEY_SIZE	32
-
-#define AES_BLOCK_SIZE		16
-
 /*
  * #define byte(x, nr) ((unsigned char)((x) >> (nr*8)))
  */
diff --git a/crypto/aes.c b/crypto/aes.c
index e244077..9d486a3 100644
--- a/crypto/aes.c
+++ b/crypto/aes.c
@@ -52,6 +52,7 @@
     s/RIJNDAEL(d_key)/D_KEY/g
 */
 
+#include <crypto/aes.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
@@ -59,11 +60,6 @@
 #include <linux/crypto.h>
 #include <asm/byteorder.h>
 
-#define AES_MIN_KEY_SIZE	16
-#define AES_MAX_KEY_SIZE	32
-
-#define AES_BLOCK_SIZE		16
-
 /*
  * #define byte(x, nr) ((unsigned char)((x) >> (nr*8))) 
  */
diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 6a86958..7c6f13f 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -13,6 +13,7 @@
 #include <linux/crypto.h>
 #include <linux/spinlock.h>
 #include <crypto/algapi.h>
+#include <crypto/aes.h>
 
 #include <asm/io.h>
 #include <asm/delay.h>
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index d4501dc..50da8b6 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -44,6 +44,7 @@
  */
 
 #include <crypto/algapi.h>
+#include <crypto/aes.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
@@ -53,9 +54,6 @@
 #include <asm/byteorder.h>
 #include "padlock.h"
 
-#define AES_MIN_KEY_SIZE	16	/* in uint8_t units */
-#define AES_MAX_KEY_SIZE	32	/* ditto */
-#define AES_BLOCK_SIZE		16	/* ditto */
 #define AES_EXTENDED_KEY_SIZE	64	/* in uint32_t units */
 #define AES_EXTENDED_KEY_SIZE_B	(AES_EXTENDED_KEY_SIZE * sizeof(uint32_t))
 
diff --git a/include/crypto/aes.h b/include/crypto/aes.h
new file mode 100644
index 0000000..9ff842f
--- /dev/null
+++ b/include/crypto/aes.h
@@ -0,0 +1,15 @@
+/*
+ * Common values for AES algorithms
+ */
+
+#ifndef _CRYPTO_AES_H
+#define _CRYPTO_AES_H
+
+#define AES_MIN_KEY_SIZE	16
+#define AES_MAX_KEY_SIZE	32
+#define AES_KEYSIZE_128		16
+#define AES_KEYSIZE_192		24
+#define AES_KEYSIZE_256		32
+#define AES_BLOCK_SIZE		16
+
+#endif

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC 4/6] [crypto] geode: move defines into a headerfile
  2007-10-12 15:21 [RFC 0/6] small geode cleanup + fallback linux-crypto
                   ` (3 preceding siblings ...)
  2007-10-12 12:38 ` [RFC 1/6] [crypto] AES: move common defines into a header file Sebastian Siewior
@ 2007-10-12 12:47 ` Sebastian Siewior
  2007-10-12 13:32 ` [RFC 6/6] [crypto] geode: use proper defines Sebastian Siewior
  2007-10-18 19:35 ` [RFC 0/6] small geode cleanup + fallback Sebastian Siewior
  6 siblings, 0 replies; 9+ messages in thread
From: Sebastian Siewior @ 2007-10-12 12:47 UTC (permalink / raw)
  To: linux-crypto

[-- Attachment #1: Type: text/plain, Size: 255 bytes --]


Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
---
 drivers/crypto/geode-aes.c |   32 --------------------------------
 drivers/crypto/geode-aes.h |   36 ++++++++++++++++++++++++++++++++++--
 2 files changed, 34 insertions(+), 34 deletions(-)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 9d0ae577c2187fe914aab2f3f486036f2ded01b9.diff --]
[-- Type: text/x-patch; name="9d0ae577c2187fe914aab2f3f486036f2ded01b9.diff", Size: 2411 bytes --]

diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 99ea594..da6164a 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -20,38 +20,6 @@
 
 #include "geode-aes.h"
 
-/* Register definitions */
-
-#define AES_CTRLA_REG  0x0000
-
-#define AES_CTRL_START     0x01
-#define AES_CTRL_DECRYPT   0x00
-#define AES_CTRL_ENCRYPT   0x02
-#define AES_CTRL_WRKEY     0x04
-#define AES_CTRL_DCA       0x08
-#define AES_CTRL_SCA       0x10
-#define AES_CTRL_CBC       0x20
-
-#define AES_INTR_REG  0x0008
-
-#define AES_INTRA_PENDING (1 << 16)
-#define AES_INTRB_PENDING (1 << 17)
-
-#define AES_INTR_PENDING  (AES_INTRA_PENDING | AES_INTRB_PENDING)
-#define AES_INTR_MASK     0x07
-
-#define AES_SOURCEA_REG   0x0010
-#define AES_DSTA_REG      0x0014
-#define AES_LENA_REG      0x0018
-#define AES_WRITEKEY0_REG 0x0030
-#define AES_WRITEIV0_REG  0x0040
-
-/*  A very large counter that is used to gracefully bail out of an
- *  operation in case of trouble
- */
-
-#define AES_OP_TIMEOUT    0x50000
-
 /* Static structures */
 
 static void __iomem * _iobase;
diff --git a/drivers/crypto/geode-aes.h b/drivers/crypto/geode-aes.h
index f479686..2f1d559 100644
--- a/drivers/crypto/geode-aes.h
+++ b/drivers/crypto/geode-aes.h
@@ -9,9 +9,9 @@
 #ifndef _GEODE_AES_H_
 #define _GEODE_AES_H_
 
-#define AES_KEY_LENGTH 16
+/* driver logic flags */
 #define AES_IV_LENGTH  16
-
+#define AES_KEY_LENGTH 16
 #define AES_MIN_BLOCK_SIZE 16
 
 #define AES_MODE_ECB 0
@@ -22,6 +22,38 @@
 
 #define AES_FLAGS_HIDDENKEY (1 << 0)
 
+/* Register definitions */
+
+#define AES_CTRLA_REG  0x0000
+
+#define AES_CTRL_START     0x01
+#define AES_CTRL_DECRYPT   0x00
+#define AES_CTRL_ENCRYPT   0x02
+#define AES_CTRL_WRKEY     0x04
+#define AES_CTRL_DCA       0x08
+#define AES_CTRL_SCA       0x10
+#define AES_CTRL_CBC       0x20
+
+#define AES_INTR_REG  0x0008
+
+#define AES_INTRA_PENDING (1 << 16)
+#define AES_INTRB_PENDING (1 << 17)
+
+#define AES_INTR_PENDING  (AES_INTRA_PENDING | AES_INTRB_PENDING)
+#define AES_INTR_MASK     0x07
+
+#define AES_SOURCEA_REG   0x0010
+#define AES_DSTA_REG      0x0014
+#define AES_LENA_REG      0x0018
+#define AES_WRITEKEY0_REG 0x0030
+#define AES_WRITEIV0_REG  0x0040
+
+/*  A very large counter that is used to gracefully bail out of an
+ *  operation in case of trouble
+ */
+
+#define AES_OP_TIMEOUT    0x50000
+
 struct geode_aes_op {
 
 	void *src;

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC 6/6] [crypto] geode: use proper defines
  2007-10-12 15:21 [RFC 0/6] small geode cleanup + fallback linux-crypto
                   ` (4 preceding siblings ...)
  2007-10-12 12:47 ` [RFC 4/6] [crypto] geode: move defines into a headerfile Sebastian Siewior
@ 2007-10-12 13:32 ` Sebastian Siewior
  2007-10-18 19:35 ` [RFC 0/6] small geode cleanup + fallback Sebastian Siewior
  6 siblings, 0 replies; 9+ messages in thread
From: Sebastian Siewior @ 2007-10-12 13:32 UTC (permalink / raw)
  To: linux-crypto

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]


Use proper defines for constants even if they point to the same
value:
- there is no min/max blocksize, there is one for AES.
- the size of the IV is the algorithm's block size in case of CBC.
- there is no key size for AES but three different :)

This is a nitpicker patch, no added value :)

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
---
 drivers/crypto/geode-aes.c |   44 ++++++++++++++++++++++----------------------
 drivers/crypto/geode-aes.h |    9 +++------
 2 files changed, 25 insertions(+), 28 deletions(-)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: b743c412b4d75286c40fa054e53189eabdd4cf8c.diff --]
[-- Type: text/x-patch; name="b743c412b4d75286c40fa054e53189eabdd4cf8c.diff", Size: 6862 bytes --]

diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 761d600..5c7ed90 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -123,12 +123,12 @@ geode_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int len)
 
 	op->keylen = len;
 
-	if (len == AES_KEY_LENGTH) {
+	if (len == AES_KEYSIZE_128) {
 		memcpy(op->key, key, len);
 		return 0;
 	}
 
-	if (len != 24 && len != 32) {
+	if (len != AES_KEYSIZE_192 && len != AES_KEYSIZE_256) {
 		/* not supported at all */
 		tfm->crt_flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
 		return -EINVAL;
@@ -201,7 +201,7 @@ geode_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
 {
 	struct geode_aes_op *op = crypto_tfm_ctx(tfm);
 
-	if (unlikely(op->keylen != 16)) {
+	if (unlikely(op->keylen != AES_KEYSIZE_128)) {
 		crypto_cipher_encrypt_one(op->fallback.cip, out, in);
 		return;
 	}
@@ -210,7 +210,7 @@ geode_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
 	op->dst = (void *) out;
 	op->mode = AES_MODE_ECB;
 	op->flags = 0;
-	op->len = AES_MIN_BLOCK_SIZE;
+	op->len = AES_BLOCK_SIZE;
 	op->dir = AES_DIR_ENCRYPT;
 
 	geode_aes_crypt(op);
@@ -222,7 +222,7 @@ geode_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
 {
 	struct geode_aes_op *op = crypto_tfm_ctx(tfm);
 
-	if (unlikely(op->keylen != 16)) {
+	if (unlikely(op->keylen != AES_KEYSIZE_128)) {
 		crypto_cipher_decrypt_one(op->fallback.cip, out, in);
 		return;
 	}
@@ -231,7 +231,7 @@ geode_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
 	op->dst = (void *) out;
 	op->mode = AES_MODE_ECB;
 	op->flags = 0;
-	op->len = AES_MIN_BLOCK_SIZE;
+	op->len = AES_BLOCK_SIZE;
 	op->dir = AES_DIR_DECRYPT;
 
 	geode_aes_crypt(op);
@@ -299,7 +299,7 @@ static struct crypto_alg geode_alg = {
 					CRYPTO_ALG_NEED_FALLBACK,
 	.cra_init               =       fallback_init,
 	.cra_exit               =       fallback_exit,
-	.cra_blocksize		=	AES_MIN_BLOCK_SIZE,
+	.cra_blocksize		=	AES_BLOCK_SIZE,
 	.cra_ctxsize		=	sizeof(struct geode_aes_op),
 	.cra_module		=	THIS_MODULE,
 	.cra_list		=	LIST_HEAD_INIT(geode_alg.cra_list),
@@ -323,18 +323,18 @@ geode_cbc_decrypt(struct blkcipher_desc *desc,
 	struct blkcipher_walk walk;
 	int err, ret;
 
-	if (unlikely(op->keylen != 16))
+	if (unlikely(op->keylen != AES_KEYSIZE_128))
 		return fallback_blk_dec(desc, dst, src, nbytes);
 
 	blkcipher_walk_init(&walk, dst, src, nbytes);
 	err = blkcipher_walk_virt(desc, &walk);
-	memcpy(op->iv, walk.iv, AES_IV_LENGTH);
+	memcpy(op->iv, walk.iv, AES_BLOCK_SIZE);
 
 	while((nbytes = walk.nbytes)) {
 		op->src = walk.src.virt.addr,
 		op->dst = walk.dst.virt.addr;
 		op->mode = AES_MODE_CBC;
-		op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
+		op->len = nbytes - (nbytes % AES_BLOCK_SIZE);
 		op->dir = AES_DIR_DECRYPT;
 
 		ret = geode_aes_crypt(op);
@@ -343,7 +343,7 @@ geode_cbc_decrypt(struct blkcipher_desc *desc,
 		err = blkcipher_walk_done(desc, &walk, nbytes);
 	}
 
-	memcpy(walk.iv, op->iv, AES_IV_LENGTH);
+	memcpy(walk.iv, op->iv, AES_BLOCK_SIZE);
 	return err;
 }
 
@@ -356,18 +356,18 @@ geode_cbc_encrypt(struct blkcipher_desc *desc,
 	struct blkcipher_walk walk;
 	int err, ret;
 
-	if (unlikely(op->keylen != 16))
+	if (unlikely(op->keylen != AES_KEYSIZE_128))
 		return fallback_blk_enc(desc, dst, src, nbytes);
 
 	blkcipher_walk_init(&walk, dst, src, nbytes);
 	err = blkcipher_walk_virt(desc, &walk);
-	memcpy(op->iv, walk.iv, AES_IV_LENGTH);
+	memcpy(op->iv, walk.iv, AES_BLOCK_SIZE);
 
 	while((nbytes = walk.nbytes)) {
 		op->src = walk.src.virt.addr,
 		op->dst = walk.dst.virt.addr;
 		op->mode = AES_MODE_CBC;
-		op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
+		op->len = nbytes - (nbytes % AES_BLOCK_SIZE);
 		op->dir = AES_DIR_ENCRYPT;
 
 		ret = geode_aes_crypt(op);
@@ -375,7 +375,7 @@ geode_cbc_encrypt(struct blkcipher_desc *desc,
 		err = blkcipher_walk_done(desc, &walk, nbytes);
 	}
 
-	memcpy(walk.iv, op->iv, AES_IV_LENGTH);
+	memcpy(walk.iv, op->iv, AES_BLOCK_SIZE);
 	return err;
 }
 
@@ -387,7 +387,7 @@ static struct crypto_alg geode_cbc_alg = {
 					CRYPTO_ALG_NEED_FALLBACK,
 	.cra_init               =       fallback_init,
 	.cra_exit               =       fallback_exit,
-	.cra_blocksize		=	AES_MIN_BLOCK_SIZE,
+	.cra_blocksize		=	AES_BLOCK_SIZE,
 	.cra_ctxsize		=	sizeof(struct geode_aes_op),
 	.cra_alignmask		=	15,
 	.cra_type		=	&crypto_blkcipher_type,
@@ -400,7 +400,7 @@ static struct crypto_alg geode_cbc_alg = {
 			.setkey			=	geode_setkey,
 			.encrypt		=	geode_cbc_encrypt,
 			.decrypt		=	geode_cbc_decrypt,
-			.ivsize			=	AES_IV_LENGTH,
+			.ivsize			=	AES_BLOCK_SIZE,
 		}
 	}
 };
@@ -414,7 +414,7 @@ geode_ecb_decrypt(struct blkcipher_desc *desc,
 	struct blkcipher_walk walk;
 	int err, ret;
 
-	if (unlikely(op->keylen != 16))
+	if (unlikely(op->keylen != AES_KEYSIZE_128))
 		return fallback_blk_dec(desc, dst, src, nbytes);
 
 	blkcipher_walk_init(&walk, dst, src, nbytes);
@@ -424,7 +424,7 @@ geode_ecb_decrypt(struct blkcipher_desc *desc,
 		op->src = walk.src.virt.addr,
 		op->dst = walk.dst.virt.addr;
 		op->mode = AES_MODE_ECB;
-		op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
+		op->len = nbytes - (nbytes % AES_BLOCK_SIZE);
 		op->dir = AES_DIR_DECRYPT;
 
 		ret = geode_aes_crypt(op);
@@ -444,7 +444,7 @@ geode_ecb_encrypt(struct blkcipher_desc *desc,
 	struct blkcipher_walk walk;
 	int err, ret;
 
-	if (unlikely(op->keylen != 16))
+	if (unlikely(op->keylen != AES_KEYSIZE_128))
 		return fallback_blk_enc(desc, dst, src, nbytes);
 
 	blkcipher_walk_init(&walk, dst, src, nbytes);
@@ -454,7 +454,7 @@ geode_ecb_encrypt(struct blkcipher_desc *desc,
 		op->src = walk.src.virt.addr,
 		op->dst = walk.dst.virt.addr;
 		op->mode = AES_MODE_ECB;
-		op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE);
+		op->len = nbytes - (nbytes % AES_BLOCK_SIZE);
 		op->dir = AES_DIR_ENCRYPT;
 
 		ret = geode_aes_crypt(op);
@@ -473,7 +473,7 @@ static struct crypto_alg geode_ecb_alg = {
 					CRYPTO_ALG_NEED_FALLBACK,
 	.cra_init               =       fallback_init,
 	.cra_exit               =       fallback_exit,
-	.cra_blocksize		=	AES_MIN_BLOCK_SIZE,
+	.cra_blocksize		=	AES_BLOCK_SIZE,
 	.cra_ctxsize		=	sizeof(struct geode_aes_op),
 	.cra_alignmask		=	15,
 	.cra_type		=	&crypto_blkcipher_type,
diff --git a/drivers/crypto/geode-aes.h b/drivers/crypto/geode-aes.h
index 14cc763..a395df8 100644
--- a/drivers/crypto/geode-aes.h
+++ b/drivers/crypto/geode-aes.h
@@ -8,12 +8,9 @@
 
 #ifndef _GEODE_AES_H_
 #define _GEODE_AES_H_
+#include <crypto/aes.h>
 
 /* driver logic flags */
-#define AES_IV_LENGTH  16
-#define AES_KEY_LENGTH 16
-#define AES_MIN_BLOCK_SIZE 16
-
 #define AES_MODE_ECB 0
 #define AES_MODE_CBC 1
 
@@ -64,8 +61,8 @@ struct geode_aes_op {
 	u32 flags;
 	int len;
 
-	u8 key[AES_KEY_LENGTH];
-	u8 iv[AES_IV_LENGTH];
+	u8 key[AES_KEYSIZE_128];
+	u8 iv[AES_BLOCK_SIZE];
 
 	union {
 		struct crypto_blkcipher *blk;

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [RFC 0/6] small geode cleanup + fallback
@ 2007-10-12 15:21 linux-crypto
  2007-10-11 14:33 ` [RFC 2/6] [crypto] geode aes: consistent IV copy Sebastian Siewior
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: linux-crypto @ 2007-10-12 15:21 UTC (permalink / raw)
  To: herbert; +Cc: linux-crypto

Hello Herbert,

This patchset started in order to verify broken Geode driver [1] without
the actual hardware. [2] contains a version of the geode-aes driver where
the hardware routines are replaced with software because I assume that 
the hardware is actually working (and this is the closest I get). I came
to the conclusion that the driver should work (I was able to mkfs,cp, sha1 
files on the crypto partition).

This patch set contains a small "clean up" of the driver and a fallback 
mode for keysize != 128. Hebert, if you like this way of fallback (patch 5) 
than I would try to hook the s390 driver with something similar.

This way of fallback allocates a "fully working" driver within the actual
driver. Therefore if we request cbc(aes) with 192 bit key, than we have
1 fallback blkcipher and 1 fallback cipher (due to the chaining nature of
the crypto API).

[1] http://www.mail-archive.com/linux-crypto@vger.kernel.org/msg01041.html
[2] git://breakpoint.cc/bigeasy/linux geode_nohw

Sebastian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC 0/6] small geode cleanup + fallback
  2007-10-12 15:21 [RFC 0/6] small geode cleanup + fallback linux-crypto
                   ` (5 preceding siblings ...)
  2007-10-12 13:32 ` [RFC 6/6] [crypto] geode: use proper defines Sebastian Siewior
@ 2007-10-18 19:35 ` Sebastian Siewior
  2007-10-19  0:52   ` Herbert Xu
  6 siblings, 1 reply; 9+ messages in thread
From: Sebastian Siewior @ 2007-10-18 19:35 UTC (permalink / raw)
  To: herbert; +Cc: linux-crypto

* linux-crypto@ml.breakpoint.cc | 2007-10-12 17:21:01 [+0200]:

>Hello Herbert,

I saw you applied 1/6 to your cryptodev tree. What about 2-6 (especially
the fallback approach)?

Sebastian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [RFC 0/6] small geode cleanup + fallback
  2007-10-18 19:35 ` [RFC 0/6] small geode cleanup + fallback Sebastian Siewior
@ 2007-10-19  0:52   ` Herbert Xu
  0 siblings, 0 replies; 9+ messages in thread
From: Herbert Xu @ 2007-10-19  0:52 UTC (permalink / raw)
  To: linux-crypto

On Thu, Oct 18, 2007 at 09:35:36PM +0200, Sebastian Siewior wrote:
> 
> I saw you applied 1/6 to your cryptodev tree. What about 2-6 (especially
> the fallback approach)?

Could you please repost?

I think I deleted them because the first patch in the original
series didn't apply.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-10-19  0:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-12 15:21 [RFC 0/6] small geode cleanup + fallback linux-crypto
2007-10-11 14:33 ` [RFC 2/6] [crypto] geode aes: consistent IV copy Sebastian Siewior
2007-10-11 15:00 ` [RFC 3/6] [crypto] geode: relax in busy loop and care about return value Sebastian Siewior
2007-10-12 12:27 ` [RFC 5/6] [crypto] geode add fallback for unsupported modes Sebastian Siewior
2007-10-12 12:38 ` [RFC 1/6] [crypto] AES: move common defines into a header file Sebastian Siewior
2007-10-12 12:47 ` [RFC 4/6] [crypto] geode: move defines into a headerfile Sebastian Siewior
2007-10-12 13:32 ` [RFC 6/6] [crypto] geode: use proper defines Sebastian Siewior
2007-10-18 19:35 ` [RFC 0/6] small geode cleanup + fallback Sebastian Siewior
2007-10-19  0:52   ` Herbert Xu

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).