[PATCH 0/2] crypto: caam - Fix rsa-caam unmap and DMA alignment

Changwei Zou <[email protected]>
Newsgroups org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
This series fixes two issues in the rsa-caam driver.

The first patch fixes incorrect unmap operations in akcipher_do_one_req()
and akcipher_enqueue_req(), where rsa_pub_unmap() was called regardless
of the key type.

The second patch fixes an intermittent -EKEYREJECTED error observed on
i.MX8 when loading signed kernel modules. The root cause is that the
rsa-caam driver DMA-maps the destination buffer directly without checking
cacheline alignment. On non-coherent DMA systems this can corrupt
adjacent memory. A bounce buffer is introduced for destination buffers
that are not cacheline-aligned.

Changwei Zou (2):
  crypto: caam - Fix wrong unmap operations
  crypto: caam - Use bounce buffer for unaligned RSA destination buffers

 drivers/crypto/caam/caampkc.c | 120 ++++++++++++++++++++++++++++++----
 drivers/crypto/caam/caampkc.h |   6 ++
 2 files changed, 113 insertions(+), 13 deletions(-)

-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.