]> git.karo-electronics.de Git - linux-beck.git/commit
crypto: nx - Fix SHA concurrence issue and sg limit bounds
authorLeonidas S. Barbosa <leosilva@linux.vnet.ibm.com>
Tue, 28 Oct 2014 17:49:46 +0000 (15:49 -0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 6 Nov 2014 15:15:02 +0000 (23:15 +0800)
commit000851119e80edd46443250a1c89d3c45cd6eeca
tree10324f2a435198b3486fd74db86acbf4b057c8d8
parent5313231ac9a4334ded1dc205aac60dd63c62ff1d
crypto: nx - Fix SHA concurrence issue and sg limit bounds

NX SHA algorithms stores the message digest into tfm what
cause a concurrence issue where hashes may be replaced by others.
This patch cleans up the cases where it's handling unnecessarily shared
variables in nx context and copies the current msg digest to a sctx->state
in order to safetly handle with the hashe's state.

Also fixes and does some clean ups regarding the right sg max limit
and bounds to the sg list avoind a memory crash.

Signed-off-by: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/nx/nx-sha256.c
drivers/crypto/nx/nx-sha512.c