All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/crypto/nx: saves chaining value from co-processor
@ 2013-08-02 23:13 ` Fionnuala Gunter
  0 siblings, 0 replies; 8+ messages in thread
From: Fionnuala Gunter @ 2013-08-02 23:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-crypto, davem, herbert, mhcerri

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(cbc(aes)).

Signed-off-by: Fionnuala Gunter <fin@linux.vnet.ibm.com>
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
---
 drivers/crypto/nx/nx-aes-cbc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/nx/nx-aes-cbc.c b/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

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

* [PATCH] drivers/crypto/nx: saves chaining value from co-processor
@ 2013-08-02 23:13 ` Fionnuala Gunter
  0 siblings, 0 replies; 8+ messages in thread
From: Fionnuala Gunter @ 2013-08-02 23:13 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-crypto, davem, herbert, mhcerri

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(cbc(aes)).

Signed-off-by: Fionnuala Gunter <fin@linux.vnet.ibm.com>
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
---
 drivers/crypto/nx/nx-aes-cbc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/nx/nx-aes-cbc.c b/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



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

* Re: [PATCH] drivers/crypto/nx: saves chaining value from co-processor
  2013-08-02 22:16       ` Fionnuala Gunter
@ 2013-08-05  2:21         ` Michael Ellerman
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Ellerman @ 2013-08-05  2:21 UTC (permalink / raw)
  To: Fionnuala Gunter; +Cc: linuxppc-dev

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

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

* Re: [PATCH] drivers/crypto/nx: saves chaining value from co-processor
  2013-08-02 21:59     ` Benjamin Herrenschmidt
@ 2013-08-02 22:16       ` Fionnuala Gunter
  2013-08-05  2:21         ` Michael Ellerman
  0 siblings, 1 reply; 8+ messages in thread
From: Fionnuala Gunter @ 2013-08-02 22:16 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Sat, 2013-08-03 at 07:59 +1000, Benjamin Herrenschmidt wrote:
> 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...

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

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

* Re: [PATCH] drivers/crypto/nx: saves chaining value from co-processor
  2013-08-02 21:55   ` Fionnuala Gunter
@ 2013-08-02 21:59     ` Benjamin Herrenschmidt
  2013-08-02 22:16       ` Fionnuala Gunter
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2013-08-02 21:59 UTC (permalink / raw)
  To: Fionnuala Gunter; +Cc: linuxppc-dev

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.

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

* Re: [PATCH] drivers/crypto/nx: saves chaining value from co-processor
  2013-08-02 21:09 ` Benjamin Herrenschmidt
@ 2013-08-02 21:55   ` Fionnuala Gunter
  2013-08-02 21:59     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 8+ messages in thread
From: Fionnuala Gunter @ 2013-08-02 21:55 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

On Sat, 2013-08-03 at 07:09 +1000, Benjamin Herrenschmidt wrote:
> 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 <fin@linux.vnet.ibm.com>
> > Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
> 
> 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

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

* Re: [PATCH] drivers/crypto/nx: saves chaining value from co-processor
  2013-08-02 20:58 Fionnuala Gunter
@ 2013-08-02 21:09 ` Benjamin Herrenschmidt
  2013-08-02 21:55   ` Fionnuala Gunter
  0 siblings, 1 reply; 8+ messages in thread
From: Benjamin Herrenschmidt @ 2013-08-02 21:09 UTC (permalink / raw)
  To: Fionnuala Gunter; +Cc: linuxppc-dev

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 <fin@linux.vnet.ibm.com>
> Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>

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.c
> b/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));

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

* [PATCH] drivers/crypto/nx: saves chaining value from co-processor
@ 2013-08-02 20:58 Fionnuala Gunter
  2013-08-02 21:09 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 8+ messages in thread
From: Fionnuala Gunter @ 2013-08-02 20:58 UTC (permalink / raw)
  To: linuxppc-dev

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 <fin@linux.vnet.ibm.com>
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
---
 drivers/crypto/nx/nx-aes-cbc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/nx/nx-aes-cbc.c
b/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

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

end of thread, other threads:[~2013-08-05  2:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-02 23:13 [PATCH] drivers/crypto/nx: saves chaining value from co-processor Fionnuala Gunter
2013-08-02 23:13 ` Fionnuala Gunter
  -- strict thread matches above, loose matches on Subject: below --
2013-08-02 20:58 Fionnuala Gunter
2013-08-02 21:09 ` Benjamin Herrenschmidt
2013-08-02 21:55   ` Fionnuala Gunter
2013-08-02 21:59     ` Benjamin Herrenschmidt
2013-08-02 22:16       ` Fionnuala Gunter
2013-08-05  2:21         ` Michael Ellerman

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.