Re: [PATCH v5 04/15] crypto: ti - Fix use-after-free of dev_data on DTHEv2 driver removal

From: Herbert Xu

Date: Mon Sep 28 2026 - 01:21:53 EST


On Thu, Sep 24, 2026 at 09:09:33PM +0530, T Pratham wrote:
>
> As an aside, my LLM suggests me to instead do:
> - .cra_reqsize = sizeof(struct dthe_aes_req_ctx),
> + .cra_reqsize = sizeof(struct dthe_aes_req_ctx) + CRYPTO_DMA_PADDING,
>
> Doesn't look to me that it is doing same thing as
> crypto_skcipher_set_reqsize_dma(). Your thoughts?

That's exactly what you should do. I'm very impressed with how
far LLM has come over the past couple of months :)

With the extra space, you can then safely use the reqctx_dma
helpers to access the aligned context.

Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt