linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sivaprakash Murugesan <sivaprak@codeaurora.org>
To: herbert@gondor.apana.org.au, davem@davemloft.net,
	stanimir.varbanov@linaro.org, ardb@kernel.org,
	sivaprak@codeaurora.org, cotequeiroz@gmail.com,
	ebiggers@google.com, horia.geanta@nxp.com,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] crypto: qce: sha: Do not modify scatterlist passed along with request
Date: Mon, 22 Jun 2020 11:45:06 +0530	[thread overview]
Message-ID: <1592806506-23978-4-git-send-email-sivaprak@codeaurora.org> (raw)
In-Reply-To: <1592806506-23978-1-git-send-email-sivaprak@codeaurora.org>

Crypto test driver's test_ahash_speed calls crypto_ahash_update and
crypto_ahash_final APIs repeatedly for all the available test vector
buffer lengths.

if we mark the end for scatterlist based on the current vector size then
the subsequent vectors might fail if the later buffer lengths are higher.

To avoid this, in qce do not mark the end of scatterlist in update API,
the qce_ahash_async_req_handle API already takes care of this copying
right amount of buffer from the request scatter list.

Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
---
 drivers/crypto/qce/sha.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/crypto/qce/sha.c b/drivers/crypto/qce/sha.c
index 9e54a667d72f..c230843e2ffb 100644
--- a/drivers/crypto/qce/sha.c
+++ b/drivers/crypto/qce/sha.c
@@ -292,8 +292,6 @@ static int qce_ahash_update(struct ahash_request *req)
 	if (!sg_last)
 		return -EINVAL;
 
-	sg_mark_end(sg_last);
-
 	if (rctx->buflen) {
 		sg_init_table(rctx->sg, 2);
 		sg_set_buf(rctx->sg, rctx->tmpbuf, rctx->buflen);
-- 
2.7.4


  parent reply	other threads:[~2020-06-22  6:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22  6:15 [PATCH 0/3] qce crypto fixes for tcrypto failures Sivaprakash Murugesan
2020-06-22  6:15 ` [PATCH 1/3] crypto: qce: support zero length test vectors Sivaprakash Murugesan
2020-06-22  6:15 ` [PATCH 2/3] crypto: qce: re-initialize context on import Sivaprakash Murugesan
2020-06-22  6:15 ` Sivaprakash Murugesan [this message]
2020-07-03  4:48 ` [PATCH 0/3] qce crypto fixes for tcrypto failures Herbert Xu

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=1592806506-23978-4-git-send-email-sivaprak@codeaurora.org \
    --to=sivaprak@codeaurora.org \
    --cc=ardb@kernel.org \
    --cc=cotequeiroz@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stanimir.varbanov@linaro.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).