OSDN Git Service

crypto: marvell - Copy IVDIG before launching partial DMA ahash requests
authorRomain Perier <romain.perier@free-electrons.com>
Wed, 14 Dec 2016 14:15:07 +0000 (15:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:39:14 +0000 (08:39 +0000)
commitbdc2571db9e7215c0557997eb763d9d4b42e9e8a
treed5bf526efde3935c8b6b04ba81bce11790b7d7fd
parent0e11f7efc0f68c2021e5813b30f690749f9280a4
crypto: marvell - Copy IVDIG before launching partial DMA ahash requests

[ Upstream commit 8759fec4af222f338d08f8f1a7ad6a77ca6cb301 ]

Currently, inner IV/DIGEST data are only copied once into the hash
engines and not set explicitly before launching a request that is not a
first frag. This is an issue especially when multiple ahash reqs are
computed in parallel or chained with cipher request, as the state of the
request being computed is not updated into the hash engine. It leads to
non-deterministic corrupted digest results.

Fixes: commit 2786cee8e50b ("crypto: marvell - Move SRAM I/O operations to step functions")
Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/marvell/cesa.h
drivers/crypto/marvell/hash.c
drivers/crypto/marvell/tdma.c