linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [CRYPTO]: Fix hmac_digest from the SG breakage.
@ 2007-10-25 20:07 Vlad Yasevich
  2007-10-26  1:46 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Vlad Yasevich @ 2007-10-25 20:07 UTC (permalink / raw)
  To: lkml; +Cc: Herbert Xu, jens.axboe

Crypto now uses SG helper functions.  Fix hmac_digest to use those
functions correctly and fix the oops associated with it.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
---
 crypto/hmac.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/crypto/hmac.c b/crypto/hmac.c
index e4eb6ac..8b7a832 100644
--- a/crypto/hmac.c
+++ b/crypto/hmac.c
@@ -158,10 +158,12 @@ static int hmac_digest(struct hash_desc *pdesc, struct scatterlist *sg,
 	desc.tfm = ctx->child;
 	desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
 
+	sg_init_table(sg1, 2);
 	sg_set_buf(sg1, ipad, bs);
-
-	sg_set_page(&sg[1], (void *) sg);
+	sg_set_page(&sg1[1], (void *) sg);
 	sg1[1].length = 0;
+
+	sg_init_table(sg2, 1);
 	sg_set_buf(sg2, opad, bs + ds);
 
 	err = crypto_hash_digest(&desc, sg1, nbytes + bs, digest);
-- 
1.5.2.4


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

* Re: [PATCH] [CRYPTO]: Fix hmac_digest from the SG breakage.
  2007-10-25 20:07 [PATCH] [CRYPTO]: Fix hmac_digest from the SG breakage Vlad Yasevich
@ 2007-10-26  1:46 ` David Miller
  2007-10-26  2:42   ` Herbert Xu
  2007-10-26 13:43   ` Vlad Yasevich
  0 siblings, 2 replies; 6+ messages in thread
From: David Miller @ 2007-10-26  1:46 UTC (permalink / raw)
  To: vladislav.yasevich; +Cc: linux-kernel, herbert, jens.axboe

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Thu, 25 Oct 2007 16:07:17 -0400

> Crypto now uses SG helper functions.  Fix hmac_digest to use those
> functions correctly and fix the oops associated with it.
> 
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

Since I keep hitting this when I try to test IPSEC on my systems
I'm going to apply this to my net-2.6 tree.

Herbert, I hope you don't mind :-)

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

* Re: [PATCH] [CRYPTO]: Fix hmac_digest from the SG breakage.
  2007-10-26  1:46 ` David Miller
@ 2007-10-26  2:42   ` Herbert Xu
  2007-10-26 13:43   ` Vlad Yasevich
  1 sibling, 0 replies; 6+ messages in thread
From: Herbert Xu @ 2007-10-26  2:42 UTC (permalink / raw)
  To: David Miller; +Cc: vladislav.yasevich, linux-kernel, jens.axboe

On Thu, Oct 25, 2007 at 06:46:54PM -0700, David Miller wrote:
> 
> Since I keep hitting this when I try to test IPSEC on my systems
> I'm going to apply this to my net-2.6 tree.
> 
> Herbert, I hope you don't mind :-)

It looks good to me.  Thanks Dave!
-- 
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] 6+ messages in thread

* Re: [PATCH] [CRYPTO]: Fix hmac_digest from the SG breakage.
  2007-10-26  1:46 ` David Miller
  2007-10-26  2:42   ` Herbert Xu
@ 2007-10-26 13:43   ` Vlad Yasevich
  2007-10-26 13:52     ` Herbert Xu
  1 sibling, 1 reply; 6+ messages in thread
From: Vlad Yasevich @ 2007-10-26 13:43 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, herbert, jens.axboe

David Miller wrote:
> From: Vlad Yasevich <vladislav.yasevich@hp.com>
> Date: Thu, 25 Oct 2007 16:07:17 -0400
> 
>> Crypto now uses SG helper functions.  Fix hmac_digest to use those
>> functions correctly and fix the oops associated with it.
>>
>> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
> 
> Since I keep hitting this when I try to test IPSEC on my systems
> I'm going to apply this to my net-2.6 tree.
> 
> Herbert, I hope you don't mind :-)
> 

Got reported to me because SCTP kept breaking.  Wasn't sure which
way to send it.

As long as it's somewhere, I am happy.

Thanks
-vlad

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

* Re: [PATCH] [CRYPTO]: Fix hmac_digest from the SG breakage.
  2007-10-26 13:43   ` Vlad Yasevich
@ 2007-10-26 13:52     ` Herbert Xu
  2007-10-26 16:59       ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Herbert Xu @ 2007-10-26 13:52 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: David Miller, linux-kernel, jens.axboe

On Fri, Oct 26, 2007 at 09:43:31AM -0400, Vlad Yasevich wrote:
>
> Got reported to me because SCTP kept breaking.  Wasn't sure which
> way to send it.
> 
> As long as it's somewhere, I am happy.

I'm happy too :)

Dave has kindly fixed the IPsec stack to initalise the tables
properly.  I'm currently in the process of fixing the rest of
the crypto users to initalise the tables properly.

Jens, could you please do a similar run for the rest of the
kernel?

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] 6+ messages in thread

* Re: [PATCH] [CRYPTO]: Fix hmac_digest from the SG breakage.
  2007-10-26 13:52     ` Herbert Xu
@ 2007-10-26 16:59       ` Jens Axboe
  0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2007-10-26 16:59 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Vlad Yasevich, David Miller, linux-kernel

On Fri, Oct 26 2007, Herbert Xu wrote:
> On Fri, Oct 26, 2007 at 09:43:31AM -0400, Vlad Yasevich wrote:
> >
> > Got reported to me because SCTP kept breaking.  Wasn't sure which
> > way to send it.
> > 
> > As long as it's somewhere, I am happy.
> 
> I'm happy too :)
> 
> Dave has kindly fixed the IPsec stack to initalise the tables
> properly.  I'm currently in the process of fixing the rest of
> the crypto users to initalise the tables properly.
> 
> Jens, could you please do a similar run for the rest of the
> kernel?

Yeah, I've already done large parts of it, will continue to make sure
everything gets seen.

-- 
Jens Axboe


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

end of thread, other threads:[~2007-10-26 17:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-25 20:07 [PATCH] [CRYPTO]: Fix hmac_digest from the SG breakage Vlad Yasevich
2007-10-26  1:46 ` David Miller
2007-10-26  2:42   ` Herbert Xu
2007-10-26 13:43   ` Vlad Yasevich
2007-10-26 13:52     ` Herbert Xu
2007-10-26 16:59       ` Jens Axboe

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