Re: [PATCH v8 1/3] crypto: ti - Add support for AES-CTR in DTHEv2 driver

From: T Pratham

Date: Mon Mar 02 2026 - 09:14:23 EST


On 28-02-2026 14:10, Herbert Xu wrote:
> 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,

Understood. Will update accordingly.
Also, sent an updated series twice with other changes.
Here, for reference, is the latest one:
https://lore.kernel.org/all/20260226125441.3559664-1-t-pratham@xxxxxx/

--
Regards
T Pratham <t-pratham@xxxxxx>