| 94a25930 | 05-Aug-2026 |
Vinicius Costa Gomes <vinicius.gomes@intel.com> |
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 m
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: 2ec6761df889 ("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>
show more ...
|
| a229e507 | 05-Aug-2026 |
Giovanni Cabiddu <giovanni.cabiddu@intel.com> |
crypto: iaa - use bounce buffer for multi-sg decompress input
Since commit e2c3b6b21c77 ("mm: zswap: use SG list decompression APIs from zsmalloc"), zswap passes the raw zsmalloc SG list directly to
crypto: iaa - use bounce buffer for multi-sg decompress input
Since commit e2c3b6b21c77 ("mm: zswap: use SG list decompression APIs from zsmalloc"), zswap passes the raw zsmalloc SG list directly to crypto drivers, so a compressed object spanning multiple pages reaches IAA as a multi-entry source. Such requests currently fall back to software decompression.
As IAA hardware requires a single DMA source buffer, linearize small multi-entry sources into a pre-allocated bounce page and submit that to the hardware instead of falling back to software. Keep the software fallback only for multi-entry destinations. This recovers most of the performance lost by using the software fallback.
Store the bounce-page state in the acomp request context alongside the existing compression CRC, free it through a shared source-unmap helper, and back the pages with a small module-wide mempool so the path remains available in reclaim-driven callers.
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
| 659f52ff | 05-Aug-2026 |
Giovanni Cabiddu <giovanni.cabiddu@intel.com> |
crypto: iaa - avoid counting fallback decompression bytes
When decompression falls back to deflate-generic after an analytics error, the request no longer completes through IAA.
Move decompression
crypto: iaa - avoid counting fallback decompression bytes
When decompression falls back to deflate-generic after an analytics error, the request no longer completes through IAA.
Move decompression byte accounting into the successful IAA completion path in both the synchronous and asynchronous flows so decomp_bytes only reflects bytes actually processed by IAA.
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
| bce4678f | 15-Dec-2025 |
Thorsten Blum <thorsten.blum@linux.dev> |
crypto: iaa - Replace sprintf with sysfs_emit in sysfs show functions
Replace sprintf() with sysfs_emit() in verify_compress_show() and sync_mode_show(). sysfs_emit() is preferred to format sysfs ou
crypto: iaa - Replace sprintf with sysfs_emit in sysfs show functions
Replace sprintf() with sysfs_emit() in verify_compress_show() and sync_mode_show(). sysfs_emit() is preferred to format sysfs output as it provides better bounds checking. No functional changes.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Acked-by: Kanchana P Sridhar <kanchana.p.sridhar@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
| e6bba609 | 28-Nov-2025 |
Thorsten Blum <thorsten.blum@linux.dev> |
crypto: iaa - Remove unreachable pr_debug from iaa_crypto_cleanup_module
iaa_unregister_compression_device() always returns 0, making the debug log message unreachable. Remove the log statement and
crypto: iaa - Remove unreachable pr_debug from iaa_crypto_cleanup_module
iaa_unregister_compression_device() always returns 0, making the debug log message unreachable. Remove the log statement and convert iaa_unregister_compression_device() to a void function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Acked-by: Kanchana P Sridhar <kanchana.p.sridhar@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
| 375a0168 | 27-Nov-2025 |
Thorsten Blum <thorsten.blum@linux.dev> |
crypto: iaa - Simplify init_iaa_device()
Return the result directly to simplify init_iaa_device().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Herbert Xu <herbert@gondor.a
crypto: iaa - Simplify init_iaa_device()
Return the result directly to simplify init_iaa_device().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|
| cc98d8ce | 24-Mar-2025 |
Herbert Xu <herbert@gondor.apana.org.au> |
crypto: iaa - Do not clobber req->base.data
The req->base.data field is for the user and must not be touched by the driver, unless you save it first.
The iaa driver doesn't seem to be using the req
crypto: iaa - Do not clobber req->base.data
The req->base.data field is for the user and must not be touched by the driver, unless you save it first.
The iaa driver doesn't seem to be using the req->base.data value so just remove the assignment.
Fixes: 09646c98d0bf ("crypto: iaa - Add irq support for the crypto async interface") Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
show more ...
|