crypto: caam - generate hash keys in-place
authorHoria Geantă <horia.geanta@nxp.com>
Tue, 19 Feb 2019 14:56:57 +0000 (16:56 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 28 Feb 2019 06:17:58 +0000 (14:17 +0800)
commit307244452d3de657744712f1208ae89a75707cbc
treeb6b33f1e938a87d8f6213d10cc4efaba470c6a4a
parent8e731ee5e2a5aa37b736c05ee2562e1169af866e
crypto: caam - generate hash keys in-place

When generating a split key or hashing the key, DMA mapping the key
buffers coming directly from user is incorrect, since they are
not guaranteed to be DMAable.

Update driver to first copy user-provided key in the output buffer
("key_out") and then use this buffer for in-place computation
(split key generation, respectively key hashing).

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