mbox series

[0/2] crypto: Make memcpy_sglist usable for Crypto API

Message ID cover.1745714222.git.herbert@gondor.apana.org.au
Headers show
Series crypto: Make memcpy_sglist usable for Crypto API | expand

Message

Herbert Xu April 27, 2025, 12:42 a.m. UTC
I added memcpy_sglist for the simple SG lists used by zswap.  It is
quite similar in terms functionality to the skcipher_null algorithm.

However, before memcpy_sglist can replace skcipher_null, it needs
to handle funky SG lists generated by IPsec.  The SG lists are
distinct, but contain identical subsets.

This patch series adds this functionality to memcpy_sglist by
remodelling it on top of skcipher_walk instead of scatterwalk.

As a prerequisite, skcipher_walk has been abstracted out of skcipher
and moved into scatterwalk.

Herbert Xu (2):
  crypto: ccp - Include crypto/utils.h for crypto_memneq
  crypto: scatterwalk - Move skcipher walk and use it for memcpy_sglist

 crypto/scatterwalk.c               | 274 +++++++++++++++++++++++++++--
 crypto/skcipher.c                  | 261 +--------------------------
 drivers/crypto/ccp/ccp-ops.c       |  11 +-
 include/crypto/algapi.h            |  12 --
 include/crypto/internal/skcipher.h |  48 +----
 include/crypto/scatterwalk.h       |  65 ++++++-
 6 files changed, 335 insertions(+), 336 deletions(-)


base-commit: 432f98cf56cf1e0f812f79a713847b37ae86cf31