[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZgVCxnI0sZcE04io@gondor.apana.org.au>
Date: Thu, 28 Mar 2024 18:13:26 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Akhil R <akhilrajeev@...dia.com>
Cc: davem@...emloft.net, robh@...nel.org, krzysztof.kozlowski+dt@...aro.org,
conor+dt@...nel.org, thierry.reding@...il.com, jonathanh@...dia.com,
catalin.marinas@....com, will@...nel.org, mperttunen@...dia.com,
airlied@...il.com, daniel@...ll.ch, linux-crypto@...r.kernel.org,
devicetree@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v6 3/5] crypto: tegra: Add Tegra Security Engine driver
On Tue, Mar 19, 2024 at 01:53:04PM +0530, Akhil R wrote:
>
> +struct tegra_sha_reqctx {
> + struct ahash_request fallback_req;
This doesn't work because ahash_request is dynamically sized.
So you'll end up clobbering the rest of the struct if a fallback
ends up being used.
You should place the fallback_req at the end of the reqctx and set
the reqsize based on the fallback reqsize.
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