]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
crypto: inside-secure - move the digest to the request context
authorAntoine Tenart <antoine.tenart@bootlin.com>
Mon, 19 Mar 2018 08:21:13 +0000 (09:21 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:30:12 +0000 (12:30 +0200)
commiteb897f1dc7cb333d4cc34afaf1a727fe35095d11
treee770229b0b13b699ece7dd7e65cc84fc527df0f0
parent9ccc0d24b8c446360cd50bd17404b68d4a6e0dcc
crypto: inside-secure - move the digest to the request context

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

This patches moves the digest information from the transformation
context to the request context. This fixes cases where HMAC init
functions were called and override the digest value for a short period
of time, as the HMAC init functions call the SHA init one which reset
the value. This lead to a small percentage of HMAC being incorrectly
computed under heavy load.

Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver")
Suggested-by: Ofer Heifetz <oferh@marvell.com>
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
[Ofer here did all the work, from seeing the issue to understanding the
root cause. I only made the patch.]
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