[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201023205059.GD27708@gondor.apana.org.au>
Date: Sat, 24 Oct 2020 07:50:59 +1100
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Arvind Sankar <nivedita@...m.mit.edu>
Cc: "David S. Miller" <davem@...emloft.net>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
Eric Biggers <ebiggers@...nel.org>,
David Laight <David.Laight@...lab.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/5] crypto: Use memzero_explicit() for clearing state
On Fri, Oct 23, 2020 at 03:21:59PM -0400, Arvind Sankar wrote:
> Without the barrier_data() inside memzero_explicit(), the compiler may
> optimize away the state-clearing if it can tell that the state is not
> used afterwards. At least in lib/crypto/sha256.c:__sha256_final(), the
> function can get inlined into sha256(), in which case the memset is
> optimized away.
Please only convert sha256 and not everything.
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