]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
crypto: inside-secure - fix the cache_len computation
authorAntoine Tenart <antoine.tenart@bootlin.com>
Tue, 13 Feb 2018 08:26:53 +0000 (09:26 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:29:02 +0000 (12:29 +0200)
commitd19b0a30ec3518c32a94b96ed3d085cd694396fc
tree0208cf9dcd6e7dc26b01f19932818c590c851ae3
parent3fbc0b19235bca5140d0fcfc56874e5833c56b15
crypto: inside-secure - fix the cache_len computation

BugLink: http://bugs.launchpad.net/bugs/1783418
[ Upstream commit 666a9c70b04fccabde5cea5e680ae1ae92460a62 ]

This patch fixes the cache length computation as cache_len could end up
being a negative value. The check between the queued size and the
block size is updated to reflect the caching mechanism which can cache
up to a full block size (included!).

Fixes: 809778e02cd4 ("crypto: inside-secure - fix hash when length is a multiple of a block")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/crypto/inside-secure/safexcel_hash.c