linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@c-s.fr>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	David S. Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-crypto@vger.kernel.org
Subject: [PATCH 2/6] crypto: talitos - fix hashing
Date: Tue, 19 Sep 2017 14:59:03 +0200 (CEST)	[thread overview]
Message-ID: <af19f4aa51d30b352b08acd416d13a917529ddd2.1505825623.git.christophe.leroy@c-s.fr> (raw)
In-Reply-To: <cover.1505825623.git.christophe.leroy@c-s.fr>

md5sum on some files gives wrong result

Exemple:

With the md5sum from libkcapi:
c15115c05bad51113f81bdaee735dd09  test

With the original md5sum:
bbdf41d80ba7e8b2b7be3a0772be76cb  test

This patch fixes this issue

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 drivers/crypto/talitos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 5cc160078286..49f1561fa694 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -1769,7 +1769,7 @@ static int common_nonsnoop_hash(struct talitos_edesc *edesc,
 
 	sg_count = edesc->src_nents ?: 1;
 	if (is_sec1 && sg_count > 1)
-		sg_copy_to_buffer(areq->src, sg_count, edesc->buf, length);
+		sg_copy_to_buffer(req_ctx->psrc, sg_count, edesc->buf, length);
 	else
 		sg_count = dma_map_sg(dev, req_ctx->psrc, sg_count,
 				      DMA_TO_DEVICE);
-- 
2.13.3

  parent reply	other threads:[~2017-09-19 12:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 12:58 [PATCH 0/6] crypto: talitos - various fixes Christophe Leroy
2017-09-19 12:59 ` [PATCH 1/6] crypto: talitos - Don't provide setkey for non hmac hashing algs Christophe Leroy
2017-09-19 12:59 ` Christophe Leroy [this message]
2017-09-19 12:59 ` [PATCH 3/6] crypto: talitos - fix sha224 Christophe Leroy
2017-09-19 12:59 ` [PATCH 4/6] crypto: talitos - fix AEAD test failures Christophe Leroy
2017-09-19 12:59 ` [PATCH 5/6] crypto: talitos - use kzalloc instead of kmalloc Christophe Leroy
2017-09-19 12:59 ` [PATCH 6/6] crypto: talitos - fix memory corruption on SEC2 Christophe Leroy
2017-09-20  8:35 ` [PATCH 0/6] crypto: talitos - various fixes Christophe LEROY
2017-09-20 19:21   ` christophe leroy

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=af19f4aa51d30b352b08acd416d13a917529ddd2.1505825623.git.christophe.leroy@c-s.fr \
    --to=christophe.leroy@c-s.fr \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.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 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).