linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: tytso@mit.edu, zatimend@hotmail.co.uk,
	linux-kernel@vger.kernel.org,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	Kees Cook <keescook@chromium.org>,
	Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH] random: add and use memzero_explicit() for clearing data
Date: Mon, 01 Dec 2014 14:39:20 +0100	[thread overview]
Message-ID: <547C6F88.9000206@redhat.com> (raw)
In-Reply-To: <20141201113815.GD5048@mwanda>

On 12/01/2014 12:38 PM, Dan Carpenter wrote:
> On Mon, Dec 01, 2014 at 02:29:57PM +0300, Dan Carpenter wrote:
>> On Mon, Dec 01, 2014 at 12:04:57PM +0100, Daniel Borkmann wrote:
>>> Well, BSD has helpers such as bzero_explicit() for such cases to work
>>> around this, which memzero_explicit() similarly does; see also [1].
>>>
>>>    [1] https://gcc.gnu.org/ml/gcc-help/2014-10/msg00059.html
>>
>> We should make memset() a define and call a custom function internally.
>
> Or we could specify -fno-builtin-memset like the GCC people suggest.

If there's a better, reliable way, I'm all for it. To me, memzero_explicit()
seemed like the least intrusive variant doing the job, I'm unsure if globally
setting -fno-builtin-memset will come with unforeseen side-effects on some
archs (besides performance-wise).

  reply	other threads:[~2014-12-01 13:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 20:01 [PATCH] random: add and use memzero_explicit() for clearing data Daniel Borkmann
2014-08-25 20:35 ` Alexey Dobriyan
2014-08-25 20:38   ` Daniel Borkmann
2014-08-25 23:11 ` Hannes Frederic Sowa
2014-08-27  3:21   ` Theodore Ts'o
2014-12-01 10:27 ` Dan Carpenter
2014-12-01 11:04   ` Daniel Borkmann
2014-12-01 11:29     ` Dan Carpenter
2014-12-01 11:38       ` Dan Carpenter
2014-12-01 13:39         ` Daniel Borkmann [this message]
2014-12-01 11:48       ` Daniel Borkmann

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=547C6F88.9000206@redhat.com \
    --to=dborkman@redhat.com \
    --cc=adobriyan@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=hannes@stressinduktion.org \
    --cc=julia.lawall@lip6.fr \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=zatimend@hotmail.co.uk \
    /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).