From: Herbert Xu <herbert@gondor.apana.org.au>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Corentin Labbe <clabbe@baylibre.com>,
Hans Ulli Kroll <ulli.kroll@googlemail.com>,
Linus Walleij <linusw@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: sl3516 - drop invalid sg_dma_len checks before DMA mapping
Date: Fri, 17 Jul 2026 18:16:33 +1000 [thread overview]
Message-ID: <alnk4X5dsPBoDfTH@gondor.apana.org.au> (raw)
In-Reply-To: <20260710074216.734849-2-thorsten.blum@linux.dev>
On Fri, Jul 10, 2026 at 09:42:17AM +0200, Thorsten Blum wrote:
> sg_dma_len() is only valid after mapping the scatterlist with
> dma_map_sg(). However, sl3516_ce_need_fallback() checks it before the
> source and destination scatterlists are mapped. Thus, a stale DMA length
> that is not a multiple of 16 could incorrectly force a software fallback
> when CONFIG_NEED_SG_DMA_LENGTH=y.
>
> Remove the invalid checks; the existing scatterlist length checks are
> sufficient.
>
> Fixes: 46c5338db7bd ("crypto: sl3516 - Add sl3516 crypto engine")
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> drivers/crypto/gemini/sl3516-ce-cipher.c | 8 --------
> 1 file changed, 8 deletions(-)
Patch applied. Thanks.
--
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
prev parent reply other threads:[~2026-07-17 8:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 7:42 [PATCH] crypto: sl3516 - drop invalid sg_dma_len checks before DMA mapping Thorsten Blum
2026-07-10 10:17 ` Linus Walleij
2026-07-17 8:16 ` Herbert Xu [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=alnk4X5dsPBoDfTH@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=clabbe@baylibre.com \
--cc=davem@davemloft.net \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thorsten.blum@linux.dev \
--cc=ulli.kroll@googlemail.com \
/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