[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aPHW_zyWwA36Usy1@gondor.apana.org.au>
Date: Fri, 17 Oct 2025 13:41:19 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: T Pratham <t-pratham@...com>
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 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.
> + 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.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists