[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <07032efd-52a2-44e1-89bd-81602be9eb32@ti.com>
Date: Fri, 17 Oct 2025 22:13:06 +0530
From: T Pratham <t-pratham@...com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: "David S. Miller" <davem@...emloft.net>,
Manorit Chawdhry
<m-chawdhry@...com>,
Kamlesh Gurudasani <kamlesh@...com>,
Shiva Tripathi
<s-tripathi1@...com>,
Kavitha Malarvizhi <k-malarvizhi@...com>,
Vishal
Mahaveer <vishalm@...com>, Praneeth Bajjuri <praneeth@...com>,
<linux-crypto@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 1/4] crypto: ti - Add support for AES-XTS in DTHEv2
driver
On 17-10-2025 11:11, Herbert Xu wrote:
> On Thu, Oct 09, 2025 at 04:11:31PM +0530, T Pratham wrote:
>>
>> +static int dthe_cipher_xts_init_tfm(struct crypto_skcipher *tfm)
>> +{
>> + struct dthe_tfm_ctx *ctx = crypto_skcipher_ctx(tfm);
>> + struct dthe_data *dev_data = dthe_get_dev(ctx);
>> +
>> + ctx->dev_data = dev_data;
>> + ctx->keylen = 0;
>> +
>> + const char *alg_name = crypto_tfm_alg_name(crypto_skcipher_tfm(tfm));
>
> Just use the name "xts(aes)" directly.
Ah, right. This can be simplified.>
>> + ctx->skcipher_fb = crypto_alloc_skcipher(alg_name, 0,
>> + CRYPTO_ALG_NEED_FALLBACK);
>
> 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.>
> Cheers,
---
Regards
T Pratham <t-pratham@...com>
Powered by blists - more mailing lists