Commit 89d8cab7 authored by Horia Geantă's avatar Horia Geantă Committed by Greg Kroah-Hartman

crypto: caam/qi2 - fix DMA mapping of stack memory

commit 5965dc74 upstream.

Commits c19650d6 ("crypto: caam - fix DMA mapping of stack memory")
and 65055e21 ("crypto: caam - fix hash context DMA unmap size")
fixed the ahash implementation in caam/jr driver such that req->result
is not DMA-mapped (since it's not guaranteed to be DMA-able).

Apply a similar fix for ahash implementation in caam/qi2 driver.

Cc: <stable@vger.kernel.org> # v4.20+
Fixes: 3f16f6c9 ("crypto: caam/qi2 - add support for ahash algorithms")
Signed-off-by: default avatarHoria Geantă <horia.geanta@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9ee4c5f2
This diff is collapsed.
...@@ -162,14 +162,12 @@ struct skcipher_edesc { ...@@ -162,14 +162,12 @@ struct skcipher_edesc {
/* /*
* ahash_edesc - s/w-extended ahash descriptor * ahash_edesc - s/w-extended ahash descriptor
* @dst_dma: I/O virtual address of req->result
* @qm_sg_dma: I/O virtual address of h/w link table * @qm_sg_dma: I/O virtual address of h/w link table
* @src_nents: number of segments in input scatterlist * @src_nents: number of segments in input scatterlist
* @qm_sg_bytes: length of dma mapped qm_sg space * @qm_sg_bytes: length of dma mapped qm_sg space
* @sgt: pointer to h/w link table * @sgt: pointer to h/w link table
*/ */
struct ahash_edesc { struct ahash_edesc {
dma_addr_t dst_dma;
dma_addr_t qm_sg_dma; dma_addr_t qm_sg_dma;
int src_nents; int src_nents;
int qm_sg_bytes; int qm_sg_bytes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment