[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1592806506-23978-4-git-send-email-sivaprak@codeaurora.org>
Date: Mon, 22 Jun 2020 11:45:06 +0530
From: Sivaprakash Murugesan <sivaprak@...eaurora.org>
To: herbert@...dor.apana.org.au, davem@...emloft.net,
stanimir.varbanov@...aro.org, ardb@...nel.org,
sivaprak@...eaurora.org, cotequeiroz@...il.com,
ebiggers@...gle.com, horia.geanta@....com,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] crypto: qce: sha: Do not modify scatterlist passed along with request
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@...eaurora.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
Powered by blists - more mailing lists