2022-09-09 10:53:12

by Cabiddu, Giovanni

[permalink] [raw]
Subject: [PATCH 0/3] crypto: qat - fix DMA mappings

This set fixes a set of issues related to an improper use of the DMA
APIs reported when CONFIG_DMA_API_DEBUG is selected and by the static
analyzer Smatch.

The first patch fixes an overlapping DMA mapping which occurs when
in-place operations that share the same buffers but a different
scatterlist structure are sent to the implementations of aead and
skcipher in the QAT driver.
The second commit reverts a patch that attempted to fix a warning
reported by Smatch. This improperly reduced the mapping size for the
region of memory used to store the input and output parameters that are
passed to the FW for performing the RSA and DH algorithms.
The last patch properly fixes the issues that the reverted commit
attempted to fix.

Damian Muszynski (2):
crypto: qat - fix DMA transfer direction
crypto: qat - use reference to structure in dma_map_single()

Giovanni Cabiddu (1):
Revert "crypto: qat - reduce size of mapped region"

drivers/crypto/qat/qat_common/qat_algs.c | 18 +++++++++-----
drivers/crypto/qat/qat_common/qat_asym_algs.c | 24 +++++++++----------
2 files changed, 24 insertions(+), 18 deletions(-)

--
2.37.1


2022-09-16 10:58:47

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH 0/3] crypto: qat - fix DMA mappings

On Fri, Sep 09, 2022 at 11:49:11AM +0100, Giovanni Cabiddu wrote:
> This set fixes a set of issues related to an improper use of the DMA
> APIs reported when CONFIG_DMA_API_DEBUG is selected and by the static
> analyzer Smatch.
>
> The first patch fixes an overlapping DMA mapping which occurs when
> in-place operations that share the same buffers but a different
> scatterlist structure are sent to the implementations of aead and
> skcipher in the QAT driver.
> The second commit reverts a patch that attempted to fix a warning
> reported by Smatch. This improperly reduced the mapping size for the
> region of memory used to store the input and output parameters that are
> passed to the FW for performing the RSA and DH algorithms.
> The last patch properly fixes the issues that the reverted commit
> attempted to fix.
>
> Damian Muszynski (2):
> crypto: qat - fix DMA transfer direction
> crypto: qat - use reference to structure in dma_map_single()
>
> Giovanni Cabiddu (1):
> Revert "crypto: qat - reduce size of mapped region"
>
> drivers/crypto/qat/qat_common/qat_algs.c | 18 +++++++++-----
> drivers/crypto/qat/qat_common/qat_asym_algs.c | 24 +++++++++----------
> 2 files changed, 24 insertions(+), 18 deletions(-)
>
> --
> 2.37.1

All applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt