[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180524093625.906068230@linuxfoundation.org>
Date: Thu, 24 May 2018 11:38:22 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Antoine Tenart <antoine.tenart@...tlin.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.14 096/165] crypto: inside-secure - fix the extra cache computation
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Antoine Tenart <antoine.tenart@...tlin.com>
[ Upstream commit c1a8fa6e240ed4b99778d48ab790743565cb61c8 ]
This patch fixes the extra cache computation when the queued data is a
multiple of a block size. This fixes the hash support in some cases.
Fixes: 809778e02cd4 ("crypto: inside-secure - fix hash when length is a multiple of a block")
Signed-off-by: Antoine Tenart <antoine.tenart@...tlin.com>
Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/crypto/inside-secure/safexcel_hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/crypto/inside-secure/safexcel_hash.c
+++ b/drivers/crypto/inside-secure/safexcel_hash.c
@@ -199,7 +199,7 @@ static int safexcel_ahash_send_req(struc
/* If this is not the last request and the queued data
* is a multiple of a block, cache the last one for now.
*/
- extra = queued - crypto_ahash_blocksize(ahash);
+ extra = crypto_ahash_blocksize(ahash);
if (extra) {
sg_pcopy_to_buffer(areq->src, sg_nents(areq->src),
Powered by blists - more mailing lists