diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-06-11 12:36:35 +0200 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2026-07-05 13:22:36 +0800 |
| commit | ba199bdaa80b09a7dd92f28751de7f3dbb06c510 (patch) | |
| tree | 2e0d00c118940969bd3b9521c90e6c8da1a5603f /tools | |
| parent | bbf3f2787e8e911149c593206905fb1874e71b6b (diff) | |
crypto: atmel-tdes - use scatterlist length before DMA mapping
Using sg_dma_len() is only valid after mapping the scatterlist with
dma_map_sg(). However, atmel_tdes_crypt_start() uses it before mapping
to compare input/output lengths and to compute the transfer count.
Use the original scatterlist lengths before DMA mapping to avoid reading
stale or uninitialized DMA lengths when CONFIG_NEED_SG_DMA_LENGTH=y.
Drop the output scatterlist length in the fast path since it is equal to
->in_sg->length and does not change the transfer count.
Fixes: 13802005d8f2 ("crypto: atmel - add Atmel DES/TDES driver")
Fixes: 1f858040c2f7 ("crypto: atmel-tdes - add support for latest release of the IP (0x700)")
Cc: stable@vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
