[PATCH] drivers/crypto/nx: saves chaining value from co-processor
From: Fionnuala Gunter <hidden>
Date: 2013-08-02 20:58:19
6 messages, 3 authors, 2013-08-05 · open the first message on its own page
From: Fionnuala Gunter <hidden>
Date: 2013-08-02 20:58:19
The chaining value from co-processor was not being saved. This value is needed because it is used as the IV, for example by cts i.e. cts(cbc(aes)). Signed-off-by: Fionnuala Gunter <redacted> Signed-off-by: Marcelo Cerri <redacted> --- drivers/crypto/nx/nx-aes-cbc.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/nx/nx-aes-cbc.cb/drivers/crypto/nx/nx-aes-cbc.c index 35d483f..a2f99a9 100644
--- a/drivers/crypto/nx/nx-aes-cbc.c
+++ b/drivers/crypto/nx/nx-aes-cbc.c@@ -95,6 +95,7 @@ static int cbc_aes_nx_crypt(struct blkcipher_desc*desc,
if (rc)
goto out;
+ memcpy(desc->info, csbcpb->cpb.aes_cbc.cv, AES_BLOCK_SIZE);
atomic_inc(&(nx_ctx->stats->aes_ops));
atomic64_add(csbcpb->csb.processed_byte_count,
&(nx_ctx->stats->aes_bytes));
--
1.7.10.4
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2013-08-02 21:09:12
On Fri, 2013-08-02 at 15:58 -0500, Fionnuala Gunter wrote:
The chaining value from co-processor was not being saved. This value is needed because it is used as the IV, for example by cts i.e. cts(cbc(aes)). Signed-off-by: Fionnuala Gunter <redacted> Signed-off-by: Marcelo Cerri <redacted>
So now you guys are sending the patch to linuxppc-dev and not the crypto list .. I need to understand things better here. Any reason why those drivers aren't handled by the crypto maintainer ? Ben.
--- drivers/crypto/nx/nx-aes-cbc.c | 1 + 1 file changed, 1 insertion(+)diff --git a/drivers/crypto/nx/nx-aes-cbc.cb/drivers/crypto/nx/nx-aes-cbc.c index 35d483f..a2f99a9 100644--- a/drivers/crypto/nx/nx-aes-cbc.c +++ b/drivers/crypto/nx/nx-aes-cbc.c@@ -95,6 +95,7 @@ static int cbc_aes_nx_crypt(struct blkcipher_desc*desc, if (rc) goto out; + memcpy(desc->info, csbcpb->cpb.aes_cbc.cv, AES_BLOCK_SIZE); atomic_inc(&(nx_ctx->stats->aes_ops)); atomic64_add(csbcpb->csb.processed_byte_count, &(nx_ctx->stats->aes_bytes));
From: Fionnuala Gunter <hidden>
Date: 2013-08-02 21:55:57
On Sat, 2013-08-03 at 07:09 +1000, Benjamin Herrenschmidt wrote:
On Fri, 2013-08-02 at 15:58 -0500, Fionnuala Gunter wrote:quoted
The chaining value from co-processor was not being saved. This value is needed because it is used as the IV, for example by cts i.e. cts(cbc(aes)). Signed-off-by: Fionnuala Gunter <redacted> Signed-off-by: Marcelo Cerri <redacted>So now you guys are sending the patch to linuxppc-dev and not the crypto list .. I need to understand things better here. Any reason why those drivers aren't handled by the crypto maintainer ? Ben.
Sorry, I thought linuxppc-dev was the right tree since the patch is for a ppc driver and you've carried previous nx driver submissions upstream. I want to submit to the proper place, so what is your preference? -Fin
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2013-08-02 21:59:23
On Fri, 2013-08-02 at 16:55 -0500, Fionnuala Gunter wrote:
Sorry, I thought linuxppc-dev was the right tree since the patch is for a ppc driver and you've carried previous nx driver submissions upstream. I want to submit to the proper place, so what is your preference?
Well, that's the right place if you want me to merge it, which seems to be what Marcelo is also expecting... However I do wonder why is that expectation there in the first place and why aren't those handled by the crypto maintainer... Cheers, Ben.
From: Fionnuala Gunter <hidden>
Date: 2013-08-02 22:17:03
On Sat, 2013-08-03 at 07:59 +1000, Benjamin Herrenschmidt wrote:
On Fri, 2013-08-02 at 16:55 -0500, Fionnuala Gunter wrote:quoted
Sorry, I thought linuxppc-dev was the right tree since the patch is for a ppc driver and you've carried previous nx driver submissions upstream. I want to submit to the proper place, so what is your preference?Well, that's the right place if you want me to merge it, which seems to be what Marcelo is also expecting...
Please merge this patch, it fixes a hot bug.
However I do wonder why is that expectation there in the first place and why aren't those handled by the crypto maintainer...
In the future I can submit patches to the crypto maintainer. -Fin
From: Michael Ellerman <hidden>
Date: 2013-08-05 02:21:21
On Fri, Aug 02, 2013 at 05:16:56PM -0500, Fionnuala Gunter wrote:
On Sat, 2013-08-03 at 07:59 +1000, Benjamin Herrenschmidt wrote:quoted
On Fri, 2013-08-02 at 16:55 -0500, Fionnuala Gunter wrote:quoted
Sorry, I thought linuxppc-dev was the right tree since the patch is for a ppc driver and you've carried previous nx driver submissions upstream. I want to submit to the proper place, so what is your preference?Well, that's the right place if you want me to merge it, which seems to be what Marcelo is also expecting...Please merge this patch, it fixes a hot bug.
You don't actually mention that anywhere in the changelog. The description implies that it's probably a bug, but doesn't describe the symptoms in any way - does it make it completely non-functional or just break in certain corner cases. And you make no mention of when this bug appeared, has it always been there, or was it introduced by a particular commit? That's important because it helps determine whether the patch should go into any of the stable trees. cheers