All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] crypto: iaa - Fixes for multi entry SG lists
@ 2026-08-05 21:19 Vinicius Costa Gomes
  2026-08-05 21:19 ` [PATCH v2 1/5] dmaengine: idxd: assign all engines to group 0 in IAA defaults Vinicius Costa Gomes
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Vinicius Costa Gomes @ 2026-08-05 21:19 UTC (permalink / raw)
  To: Dave Jiang, Vinod Koul, Frank Li, Kristen Accardi, Herbert Xu,
	David S. Miller, Andrew Morton, Yosry Ahmed, Nhat Pham
  Cc: dmaengine, linux-kernel, linux-crypto, Vinicius Costa Gomes,
	Giovanni Cabiddu, stable

Since commit e2c3b6b21c77 ("mm: zswap: use SG list decompression APIs
from zsmalloc"), iaa_crypto started seeing some failures with
multi-entry scatter lists.

For that we introduce software fallback, in patch 2/5, to iaa-crypto
when SG lists have more than one entry, for both input and output.
Patch 4/5 adds a bounce buffer so small/simple requests can be
linearized and sent to the hardware. This recovers most of the
performance.

Patch 1/5 updates the default resources reserved to iaa-crypto so more
engines are associated to the iaa_crypto group, resulting in better
utilization by default. Patch 3/5 fixes so software request "bytes"
are not counted as hardware "bytes". As the idxd changes only affect
iaa_crypto, sending them here makes more sense. Patch 5/5 fixes a
pre-existing issue pointed out by sashiko, that could cause data
corruption when a hardware error is reported.

A potential use-after-free issue when a descriptor submission times
out, pointed out by Sashiko, still remains and will be handled on a
future series.

It should be noted that as the software and hardware implementations
have different expectations for the window size, something like patch
[1] or the future 'set_params()' API are needed to verify that patch
2/5 works without patch 4/5.

[1] https://lore.kernel.org/linux-crypto/20260326100433.57324-1-giovanni.cabiddu@intel.com/

Cheers,

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
Changes in v2:
- Added patch 5/5, for a pre-existing issue, that touches the same
  code paths as this series (Sashiko);
- I took an old version of Giovanni's patch 4/5, new version is
  simpler to read; because of changes did not take Dave Jiang's
  Reviewed-by;
- Added the missing Signed-off-by tags (Dave Jiang);
- Link to v1: https://patch.msgid.link/20260713-iaa-crypto-fixes-zswap-v1-0-65cac23c684d@intel.com

---
Giovanni Cabiddu (4):
      dmaengine: idxd: assign all engines to group 0 in IAA defaults
      crypto: iaa - fall back to software for multi-entry scatterlists
      crypto: iaa - avoid counting fallback decompression bytes
      crypto: iaa - use bounce buffer for multi-sg decompress input

Vinicius Costa Gomes (1):
      crypto: iaa - unmap dst before software fallback on decompress

 drivers/crypto/intel/iaa/iaa_crypto_main.c  | 270 +++++++++++++++++++---------
 drivers/crypto/intel/iaa/iaa_crypto_stats.c |   9 +
 drivers/crypto/intel/iaa/iaa_crypto_stats.h |   2 +
 drivers/dma/idxd/defaults.c                 |  12 +-
 4 files changed, 201 insertions(+), 92 deletions(-)
---
base-commit: 947d62c094367ef6064907d570b47612cd579df6
change-id: 20260713-iaa-crypto-fixes-zswap-ff5baae311d1

Best regards,
--  
Vinicius


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-08-11 18:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 21:19 [PATCH v2 0/5] crypto: iaa - Fixes for multi entry SG lists Vinicius Costa Gomes
2026-08-05 21:19 ` [PATCH v2 1/5] dmaengine: idxd: assign all engines to group 0 in IAA defaults Vinicius Costa Gomes
2026-08-05 21:41   ` sashiko-bot
2026-08-05 21:19 ` [PATCH v2 2/5] crypto: iaa - fall back to software for multi-entry scatterlists Vinicius Costa Gomes
2026-08-05 21:38   ` sashiko-bot
2026-08-05 21:19 ` [PATCH v2 3/5] crypto: iaa - avoid counting fallback decompression bytes Vinicius Costa Gomes
2026-08-05 21:32   ` sashiko-bot
2026-08-05 21:19 ` [PATCH v2 4/5] crypto: iaa - use bounce buffer for multi-sg decompress input Vinicius Costa Gomes
2026-08-05 21:36   ` sashiko-bot
2026-08-05 21:19 ` [PATCH v2 5/5] crypto: iaa - unmap dst before software fallback on decompress Vinicius Costa Gomes
2026-08-11 18:52 ` (subset) [PATCH v2 0/5] crypto: iaa - Fixes for multi entry SG lists Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.