]> git.karo-electronics.de Git - linux-beck.git/commit
crypto: nx - fix SHA-2 for chunks bigger than block size
authorMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
Thu, 29 Aug 2013 14:36:40 +0000 (11:36 -0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 2 Sep 2013 10:32:56 +0000 (20:32 +1000)
commit069fa0453f9dc86fd97dd5b3f5fda4724ed5ff69
tree7ceed83003c64dd51c5a99fafef144bf8320e124
parentdec0ed6c1b2c8c2aa37c04feccaf4784764c95f1
crypto: nx - fix SHA-2 for chunks bigger than block size

Each call to the co-processor, with exception of the last call, needs to
send data that is multiple of block size. As consequence, any remaining
data is kept in the internal NX context.

This patch fixes a bug in the driver that causes it to save incorrect
data into the context when data is bigger than the block size.

Reviewed-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
Signed-off-by: Marcelo Cerri <mhcerri@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