OSDN Git Service

crypto: caam - handle zero-length AEAD output
authorHoria Geantă <horia.geanta@nxp.com>
Tue, 22 Jan 2019 14:47:01 +0000 (16:47 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 1 Feb 2019 06:42:03 +0000 (14:42 +0800)
commit763069ba49d3fa342fe35487d5de10fcf1589381
tree7cf6bdd30cc6cc561ce418cfd6411e3aadc65bcb
parent87870cfb4b5a93c70e2dc32d0349af0625bd5546
crypto: caam - handle zero-length AEAD output

Recent AEAD changes in testmgr framework introduced by commit
a0d608ee5ebf ("crypto: testmgr - unify the AEAD encryption and decryption test vectors")
uncovered an error in the CAAM drivers, since they don't correctly
handle the case when AEAD output length is zero.

Add checks to avoid feeding zero-length req->dst to DMA API.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/caamalg_qi.c
drivers/crypto/caam/caamalg_qi2.c