Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH 2/2] crypto: scatterwalk - Move skcipher walk and use it for memcpy_sglist
Date: Sat, 26 Apr 2025 18:08:34 -0700	[thread overview]
Message-ID: <20250427010834.GB68006@quark> (raw)
In-Reply-To: <8a564443ba01b29418291a4e3045e2546cd9e3a8.1745714222.git.herbert@gondor.apana.org.au>

On Sun, Apr 27, 2025 at 08:42:54AM +0800, Herbert Xu wrote:
> Move the generic part of skcipher walk into scatterwalk, and use
> it to implement memcpy_sglist.
> 
> This makes memcpy_sglist do the right thing when two distinct SG
> lists contain identical subsets (e.g., the AD part of AEAD).
> 
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

I think it would end up faster and simpler to just implement the copy from first
principles instead of trying to share the code with skcipher_walk.  There is way
too much stuff that skcipher_walk has to handle that isn't relevant for a simple
copy.

- Eric

  reply	other threads:[~2025-04-27  1:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-27  0:42 [PATCH 0/2] crypto: Make memcpy_sglist usable for Crypto API Herbert Xu
2025-04-27  0:42 ` [PATCH 1/2] crypto: ccp - Include crypto/utils.h for crypto_memneq Herbert Xu
2025-04-27  0:42 ` [PATCH 2/2] crypto: scatterwalk - Move skcipher walk and use it for memcpy_sglist Herbert Xu
2025-04-27  1:08   ` Eric Biggers [this message]
2025-04-27  1:12     ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250427010834.GB68006@quark \
    --to=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox