From: Sami Kerola <kerolasa@iki.fi>
To: Christoph Hellwig <hch@infradead.org>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH] libuuid: use explicit_bzero() in uuid_clear() when possible
Date: Mon, 23 Oct 2017 20:38:20 +0100 [thread overview]
Message-ID: <CAG27Bk0aKyD_ZuTOUTM4jgvaioWGLA2-jUHeZTABO+0hz354gw@mail.gmail.com> (raw)
In-Reply-To: <20171018071531.GA2929@infradead.org>
On 18 October 2017 at 08:15, Christoph Hellwig <hch@infradead.org> wrote:
> On Mon, Oct 16, 2017 at 10:37:34PM +0100, Sami Kerola wrote:
>> This ensures value is blanked. It is possible compiler optimization removed
>> earlier uuid_clear() calls as unnecessary if value was not used after clear.
>
> Can you explain the logic behind this a bit more? If no one uses the
> uuid later it doesn't matter if we cleared it or not.
When value is not used compiler might deside to remove such clearning
altogether. To me uuid_clear() is promise that the value disappears, and
that is what the function should do. Who knows, maybe someone uses
uuids to something sensitive that must be cleared not to leak secrets.
In that sort of context one really hopes promise of clearing is kept.
--
Sami Kerola
http://www.iki.fi/kerolasa/
next prev parent reply other threads:[~2017-10-23 19:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 21:37 [PATCH] libuuid: use explicit_bzero() in uuid_clear() when possible Sami Kerola
2017-10-18 7:15 ` Christoph Hellwig
2017-10-23 19:38 ` Sami Kerola [this message]
2017-10-24 9:30 ` Christoph Hellwig
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=CAG27Bk0aKyD_ZuTOUTM4jgvaioWGLA2-jUHeZTABO+0hz354gw@mail.gmail.com \
--to=kerolasa@iki.fi \
--cc=hch@infradead.org \
--cc=kerolasa@gmail.com \
--cc=util-linux@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).