crypto: talitos - check data blocksize in ablkcipher.
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 21 May 2019 13:34:12 +0000 (13:34 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 30 May 2019 07:30:04 +0000 (15:30 +0800)
commitee483d32ee1a1a7f7d7e918fbc350c790a5af64a
tree38bcdac8d726b8391a1c2cbd30b4edcab720f867
parentb9a05b6041cb9810a291315569b2af0d63c3680a
crypto: talitos - check data blocksize in ablkcipher.

When data size is not a multiple of the alg's block size,
the SEC generates an error interrupt and dumps the registers.
And for NULL size, the SEC does just nothing and the interrupt
is awaited forever.

This patch ensures the data size is correct before submitting
the request to the SEC engine.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Fixes: 4de9d0b547b9 ("crypto: talitos - Add ablkcipher algorithms")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/talitos.c