From: Vlad Yasevich <vladislav.yasevich@hp.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>, jens.axboe@oracle.com
Subject: [PATCH] [CRYPTO]: Fix hmac_digest from the SG breakage.
Date: Thu, 25 Oct 2007 16:07:17 -0400 [thread overview]
Message-ID: <4720F775.8030702@hp.com> (raw)
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
next reply other threads:[~2007-10-25 20:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-25 20:07 Vlad Yasevich [this message]
2007-10-26 1:46 ` [PATCH] [CRYPTO]: Fix hmac_digest from the SG breakage 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
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=4720F775.8030702@hp.com \
--to=vladislav.yasevich@hp.com \
--cc=herbert@gondor.apana.org.au \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
/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 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.