]> git.baikalelectronics.ru Git - 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)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Mar 2018 17:32:42 +0000 (01:32 +0800)
commit5927454ab1fde65b378eb3ac43c40ca8426eccac
tree56c77e43aee7dd8737cb9b910f39bf12b18aac74
parent6df4f1f6ec83a48b5daa2cb741b3e8b1f572e5c2
crypto: inside-secure - move the digest to the request context

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: 4db5ddddd6e4 ("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>
drivers/crypto/inside-secure/safexcel_hash.c