From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [v2 PATCH 2/3] crypto: scatterwalk - Add memcpy_sglist
Date: Sat, 26 Apr 2025 14:16:27 +0800 [thread overview]
Message-ID: <aAx6O0rrIm67WgJm@gondor.apana.org.au> (raw)
In-Reply-To: <20250311043651.GA1263@sol.localdomain>
On Mon, Mar 10, 2025 at 09:36:51PM -0700, Eric Biggers wrote:
>
> Actually this new function is useless as-is, since it invokes undefined behavior
> when the source and destination coincide (which can happen even when src ==
> dst), and all the potential callers need to handle that case. I'm working on a
> fixed version.
Yes I just tried using it in chacha20poly1305 and it was no good,
as it can't deal with the partially identical SG lists that IPsec
creates.
So I've fixed it by rewriting it based on skcipher_walk. In order
to do so I've moved the common bits of skcipher_walk out of skcipher
and into scatterwalk.
This should be good enough to replace skcipher_null.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2025-04-26 6:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-07 3:36 [v2 PATCH 0/3] crypto: scatterwalk - scatterwalk_next and memcpy_sglist Herbert Xu
2025-03-07 3:36 ` [v2 PATCH 1/3] crypto: scatterwalk - Change scatterwalk_next calling convention Herbert Xu
2025-03-07 21:43 ` Eric Biggers
2025-03-08 10:46 ` Herbert Xu
2025-03-07 3:36 ` [v2 PATCH 2/3] crypto: scatterwalk - Add memcpy_sglist Herbert Xu
2025-03-07 21:37 ` Eric Biggers
2025-03-08 10:52 ` Herbert Xu
2025-03-10 17:06 ` Eric Biggers
2025-03-11 4:36 ` Eric Biggers
2025-04-26 6:16 ` Herbert Xu [this message]
2025-03-07 3:36 ` [v2 PATCH 3/3] crypto: skcipher - Eliminate duplicate virt.addr field Herbert Xu
2025-03-07 21:48 ` Eric Biggers
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=aAx6O0rrIm67WgJm@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=ebiggers@kernel.org \
--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