public inbox for linux-crypto@vger.kernel.org
 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: [v2 PATCH 3/3] crypto: skcipher - Eliminate duplicate virt.addr field
Date: Fri, 7 Mar 2025 13:48:11 -0800	[thread overview]
Message-ID: <20250307214811.GC27856@quark.localdomain> (raw)
In-Reply-To: <2234a3dc7c2765c6067824288961f9d6841a5b0a.1741318360.git.herbert@gondor.apana.org.au>

On Fri, Mar 07, 2025 at 11:36:21AM +0800, Herbert Xu wrote:
> diff --git a/crypto/skcipher.c b/crypto/skcipher.c
> index 92def074374a..24bb78f45bfb 100644
> --- a/crypto/skcipher.c
> +++ b/crypto/skcipher.c
> @@ -43,14 +43,12 @@ static inline void skcipher_map_src(struct skcipher_walk *walk)
>  {
>  	/* XXX */
>  	walk->in.maddr = scatterwalk_map(&walk->in);
> -	walk->src.virt.addr = walk->in.addr;
>  }

This patch makes all the callers of scatterwalk_map() assign the returned
address to the struct scatter_walk itself.  So that should just be done by
scatterwalk_map() itself.  Then skcipher_map_src() and skcipher_map_dst() should
be removed and the callers updated to use scatterwalk_map(&walk->in) and
scatterwalk_map(&walk->out) directly.

> @@ -214,7 +209,7 @@ static int skcipher_next_fast(struct skcipher_walk *walk)
>  		(u8 *)(sg_page(walk->out.sg) + (walk->out.offset >> PAGE_SHIFT));
>  
>  	skcipher_map_src(walk);
> -	walk->dst.virt.addr = walk->src.virt.addr;
> +	walk->out.maddr = walk->in.maddr;
>  
>  	if (diff) {
>  		walk->flags |= SKCIPHER_WALK_DIFF;

Note that this will have to be rebased on top of
https://lore.kernel.org/r/20250306033305.163767-1-ebiggers@kernel.org
(sorry for missing that earlier).

- Eric

      reply	other threads:[~2025-03-07 21:48 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
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 [this message]

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=20250307214811.GC27856@quark.localdomain \
    --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