Home
last modified time | relevance | path

Searched hist:bbf2234494afd14a720d61a233c21b95e4261326 (Results 1 – 2 of 2) sorted by relevance

/linux/drivers/crypto/caam/
H A Dcaamhash.cdiff bbf2234494afd14a720d61a233c21b95e4261326 Fri Feb 10 13:07:22 CET 2017 Horia Geantă <horia.geanta@nxp.com> crypto: caam - fix DMA API leaks for multiple setkey() calls

setkey() callback may be invoked multiple times for the same tfm.
In this case, DMA API leaks are caused by shared descriptors
(and key for caamalg) being mapped several times and unmapped only once.
Fix this by performing mapping / unmapping only in crypto algorithm's
cra_init() / cra_exit() callbacks and sync_for_device in the setkey()
tfm callback.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
H A Dcaamalg.cdiff bbf2234494afd14a720d61a233c21b95e4261326 Fri Feb 10 13:07:22 CET 2017 Horia Geantă <horia.geanta@nxp.com> crypto: caam - fix DMA API leaks for multiple setkey() calls

setkey() callback may be invoked multiple times for the same tfm.
In this case, DMA API leaks are caused by shared descriptors
(and key for caamalg) being mapped several times and unmapped only once.
Fix this by performing mapping / unmapping only in crypto algorithm's
cra_init() / cra_exit() callbacks and sync_for_device in the setkey()
tfm callback.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>