From: Greg KH <gregkh@linuxfoundation.org>
To: Sandy Harris <sandyinchina@gmail.com>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
linux-hardening@vger.kernel.org
Subject: Re: memset() in crypto code
Date: Fri, 3 Sep 2021 08:15:24 +0200 [thread overview]
Message-ID: <YTG9fAQTha7ZP/kh@kroah.com> (raw)
In-Reply-To: <CACXcFmnOeHwuu4N=WiGrMB+NNgGer9oCLoG0JAORN03gv1y+HQ@mail.gmail.com>
On Fri, Sep 03, 2021 at 09:13:43AM +0800, Sandy Harris wrote:
> Doing this the crypto directory:
> grep memset *.c | wc -l
> I get 137 results.
>
> The compiler may optimise memset() away, subverting the intent of
> these operations. We have memzero_explicit() to avoid that problem.
>
> Should most or all those memset() calls be replaced?
The ones that are determined to actually need this, sure, but a simple
grep like that does not actually show that. You need to read the code
itself to determine the need or not, please do so.
good luck!
greg k-h
next prev parent reply other threads:[~2021-09-03 6:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-03 1:13 memset() in crypto code Sandy Harris
2021-09-03 6:15 ` Greg KH [this message]
2021-11-16 0:47 ` Sandy Harris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YTG9fAQTha7ZP/kh@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=sandyinchina@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox