[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZCatp5UWC/la+flQ@gondor.apana.org.au>
Date: Fri, 31 Mar 2023 17:53:43 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: horia.geanta@....com, pankaj.gupta@....com, gaurav.jain@....com,
davem@...emloft.net, kim.phillips@...escale.com,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH v2] crypto: caam: Clear some memory in instantiate_rng()
On Tue, Mar 21, 2023 at 07:59:30AM +0100, Christophe JAILLET wrote:
> According to the comment at the end of the 'for' loop just a few lines
> below, it looks needed to clear 'desc'.
>
> So it should also be cleared for the first iteration.
>
> Move the memset() to the beginning of the loop to be safe.
>
> Fixes: 281922a1d4f5 ("crypto: caam - add support for SEC v5.x RNG4")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> v1 --> v2:
> - move the memset() instead of doing s/kmalloc/kzalloc/
> - adding a Fixes tag
>
> v1:
> https://lore.kernel.org/all/16d6bf3bd7a6e96a8262fcd4680e3ccbb5a50478.1679355849.git.christophe.jaillet@wanadoo.fr/
>
> For for loop has been introduceD in commit 1005bccd7a4a ("crypto: caam -
> enable instantiation of all RNG4 state handles"). But if 'desc' really
> needs to be cleared, the issue was there before (thus the Fixes tag in
> the commit log)
> ---
> drivers/crypto/caam/ctrl.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Patch applied. Thanks.
--
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