crypto: ccree - don't map AEAD key and IV on stack
authorGilad Ben-Yossef <gilad@benyossef.com>
Thu, 18 Apr 2019 13:39:05 +0000 (16:39 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 25 Apr 2019 07:38:16 +0000 (15:38 +0800)
commite8662a6a5f8f7f2cadc0edb934aef622d96ac3ee
treeaebc2822832132eec3ba15267c46cdc9b7411baf
parent874e163759f27e0a9988c5d1f4605e3f25564fd2
crypto: ccree - don't map AEAD key and IV on stack

The AEAD authenc key and IVs might be passed to us on stack. Copy it to
a slab buffer before mapping to gurantee proper DMA mapping.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_aead.c
drivers/crypto/ccree/cc_buffer_mgr.c
drivers/crypto/ccree/cc_driver.h