linux/drivers/crypto/intel/iaa
Vinicius Costa Gomes 94a2593047 crypto: iaa - unmap dst before software fallback on decompress
On a hardware analytics error, decompress retries through the software
fallback, which writes req->dst with the CPU while it is still mapped
DMA_FROM_DEVICE. With SWIOTLB active the later dma_unmap_sg() copies the
stale bounce buffer over req->dst, corrupting the result.

Unmap before the fallback runs. The async path unmaps inline; the sync
path signals the retry with -EAGAIN so iaa_comp_adecompress() runs the
fallback after unmapping.

Fixes: 2ec6761df8 ("crypto: iaa - Add support for deflate-iaa compression algorithm")
Cc: stable@vger.kernel.org
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2026-08-15 11:28:36 +10:00
..
iaa_crypto_comp_fixed.c crypto: iaa - Remove header table code 2024-01-26 16:39:32 +08:00
iaa_crypto_main.c crypto: iaa - unmap dst before software fallback on decompress 2026-08-15 11:28:36 +10:00
iaa_crypto_stats.c crypto: iaa - fall back to software for multi-entry scatterlists 2026-08-15 11:28:36 +10:00
iaa_crypto_stats.h crypto: iaa - fall back to software for multi-entry scatterlists 2026-08-15 11:28:36 +10:00
iaa_crypto.h crypto: iaa - Change iaa statistics to atomic64_t 2024-04-02 10:49:38 +08:00
Kconfig crypto: iaa - Add IAA Compression Accelerator stats 2023-12-15 17:52:53 +08:00
Makefile module: Convert default symbol namespace to string literal 2024-12-03 08:22:25 -08:00