Re: [PATCH v4 1/4] crypto: ti - Add support for AES-XTS in DTHEv2 driver

From: T Pratham

Date: Tue Oct 21 2025 - 11:10:56 EST


Hi Herbert,
On 17-10-2025 22:13, T Pratham wrote:
> On 17-10-2025 11:11, Herbert Xu wrote:
>> On Thu, Oct 09, 2025 at 04:11:31PM +0530, T Pratham wrote:
>>>
>>
>> You should allocate a fallback that is synchronous only. Then you
>> can store the sub-request on the stack with SYNC_SKCIPHER_REQUEST_ON_STACK.
>> Otherwise the sub-request reqsize may overflow your request object.
>
> Understood. Will correct this.

Since a similar mechanism is not available for AEADs, I was wondering if
doing the following in the tfm_init functions of AEAD algs (PATCH 3/4
and 4/4 of this series) is acceptable, esp. since setting reqsize is
moved to the algorithm struct field cra_reqsize.

+ unsigned int reqsize = crypto_aead_reqsize(tfm);
+ crypto_aead_set_reqsize(tfm, reqsize +
crypto_aead_reqsize(ctx->aead_fb));


I noticed all older existing drivers using a fallback do something
similar, and was wondering if you'll still accept new drivers which use
crypto_*_set_reqsize() to modify reqsize for fallback use-cases?

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