From: Herbert Xu <herbert@gondor.apana.org.au>
To: T Pratham <t-pratham@ti.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Manorit Chawdhry <m-chawdhry@ti.com>,
Kamlesh Gurudasani <kamlesh@ti.com>,
Shiva Tripathi <s-tripathi1@ti.com>,
Kavitha Malarvizhi <k-malarvizhi@ti.com>,
Vishal Mahaveer <vishalm@ti.com>,
Praneeth Bajjuri <praneeth@ti.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 1/3] crypto: ti - Add support for AES-CTR in DTHEv2 driver
Date: Sat, 28 Feb 2026 17:40:47 +0900 [thread overview]
Message-ID: <aaKqD5FP6w8dp48p@gondor.apana.org.au> (raw)
In-Reply-To: <b3b9f41a-adc3-408f-9fc9-69618c4aa2ba@ti.com>
On Fri, Feb 06, 2026 at 05:07:13PM +0530, T Pratham wrote:
>
> The DMA (at least UDMA in K3 SoCs) sends/receives all the mapped length.
> If I have the dst sg mapped with length (len + x) but write len in
> crypto hardware, the DMA gets stuck waiting for hardware to send the
> extra x len. Similar issue in reverse as well.
>
> Also, FWIW, I'm restoring the len in SG list correctly at the end.
If that's the case wouldn't it also break if the caller supplied
an SG list that's longer than req->cryptlen? There is no requirement
that the SG list must be exactly as long as req->cryptlen and it
can contain extra data at the end.
Perhaps you should use sg_split like sa2ul.
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
next prev parent reply other threads:[~2026-02-28 8:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 14:44 [PATCH v8 0/3] Add support for more AES modes in TI DTHEv2 T Pratham
2026-01-20 14:44 ` [PATCH v8 1/3] crypto: ti - Add support for AES-CTR in DTHEv2 driver T Pratham
2026-02-06 8:53 ` Herbert Xu
2026-02-06 11:37 ` T Pratham
2026-02-28 8:40 ` Herbert Xu [this message]
2026-03-02 14:08 ` T Pratham
2026-01-20 14:44 ` [PATCH v8 2/3] crypto: ti - Add support for AES-GCM " T Pratham
2026-01-20 14:44 ` [PATCH v8 3/3] crypto: ti - Add support for AES-CCM " T Pratham
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=aaKqD5FP6w8dp48p@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=k-malarvizhi@ti.com \
--cc=kamlesh@ti.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m-chawdhry@ti.com \
--cc=praneeth@ti.com \
--cc=s-tripathi1@ti.com \
--cc=t-pratham@ti.com \
--cc=vishalm@ti.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
all inboxes | Powered by JetHome®