All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: dhowells@redhat.com, Joe Perches <joe@perches.com>,
	Waiman Long <longman@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Linux-MM <linux-mm@kvack.org>,
	keyrings@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Matthew Wilcox <willy@infradead.org>,
	David Rientjes <rientjes@google.com>,
	law@redhat.com
Subject: Re: [PATCH v2] mm: Add kvfree_sensitive() for freeing sensitive data objects
Date: Tue, 07 Apr 2020 22:54:10 +0000	[thread overview]
Message-ID: <749735.1586300050@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAHk-=whwaNvyd1q=h0nUQio9byojpxufGkOiVfAh10woRs8KSA@mail.gmail.com>

Linus Torvalds <torvalds@linux-foundation.org> wrote:

> > It might be worth asking the compiler folks to give us an __attribute__ for
> > that - even if they don't do anything with it immediately.  So we might have
> > something like:
> >
> >         void free(const volatile void *ptr) __attribute__((free(1)));
> 
> Yeah, that sounds sane.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94527

> Even if it wasn't initially used for anything it wouldn't hurt, and maybe
> some day it would improve warnings (and allow the compiler to do the dead
> store elimination that started this whole long set of threads in the first
> place..)

With regard to this, I've got back "not sure what Linus was talking about WRT
DSE, if he's got examples he could pass along, they'd be appreciated"

David

WARNING: multiple messages have this Message-ID (diff)
From: David Howells <dhowells@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: dhowells@redhat.com, Joe Perches <joe@perches.com>,
	Waiman Long <longman@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Linux-MM <linux-mm@kvack.org>,
	keyrings@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Matthew Wilcox <willy@infradead.org>,
	David Rientjes <rientjes@google.com>,
	law@redhat.com
Subject: Re: [PATCH v2] mm: Add kvfree_sensitive() for freeing sensitive data objects
Date: Tue, 07 Apr 2020 23:54:10 +0100	[thread overview]
Message-ID: <749735.1586300050@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAHk-=whwaNvyd1q=h0nUQio9byojpxufGkOiVfAh10woRs8KSA@mail.gmail.com>

Linus Torvalds <torvalds@linux-foundation.org> wrote:

> > It might be worth asking the compiler folks to give us an __attribute__ for
> > that - even if they don't do anything with it immediately.  So we might have
> > something like:
> >
> >         void free(const volatile void *ptr) __attribute__((free(1)));
> 
> Yeah, that sounds sane.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94527

> Even if it wasn't initially used for anything it wouldn't hurt, and maybe
> some day it would improve warnings (and allow the compiler to do the dead
> store elimination that started this whole long set of threads in the first
> place..)

With regard to this, I've got back "not sure what Linus was talking about WRT
DSE, if he's got examples he could pass along, they'd be appreciated"

David


  parent reply	other threads:[~2020-04-07 22:54 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 18:58 [PATCH v2] mm: Add kvfree_sensitive() for freeing sensitive data objects Waiman Long
2020-04-06 18:58 ` Waiman Long
2020-04-06 19:38 ` Joe Perches
2020-04-06 19:38   ` Joe Perches
2020-04-06 19:38   ` Joe Perches
2020-04-07  2:16   ` Waiman Long
2020-04-07  2:16     ` Waiman Long
2020-04-07  6:41     ` Joe Perches
2020-04-07  6:41       ` Joe Perches
2020-04-07  6:41       ` Joe Perches
2020-04-07 20:16   ` Linus Torvalds
2020-04-07 20:16     ` Linus Torvalds
2020-04-07 20:16     ` Linus Torvalds
2020-04-07 20:26     ` Linus Torvalds
2020-04-07 20:26       ` Linus Torvalds
2020-04-07 20:26       ` Linus Torvalds
2020-04-07 21:14     ` David Howells
2020-04-07 21:14       ` David Howells
2020-04-07 21:22       ` Linus Torvalds
2020-04-07 21:22         ` Linus Torvalds
2020-04-07 21:22         ` Linus Torvalds
2020-04-07 22:24       ` Matthew Wilcox
2020-04-07 22:24         ` Matthew Wilcox
2020-04-07 22:54       ` David Howells [this message]
2020-04-07 22:54         ` David Howells
2020-04-07 23:50         ` Linus Torvalds
2020-04-07 23:50           ` Linus Torvalds
2020-04-07 23:50           ` Linus Torvalds
2020-04-06 20:00 ` Matthew Wilcox
2020-04-06 20:00   ` Matthew Wilcox
2020-04-07 20:07   ` Waiman Long
2020-04-07 20:07     ` Waiman Long
2020-04-07 20:01 ` Waiman Long
2020-04-07 20:01   ` Waiman Long
2020-04-07 20:02   ` Waiman Long
2020-04-07 20:02     ` Waiman Long

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=749735.1586300050@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jmorris@namei.org \
    --cc=joe@perches.com \
    --cc=keyrings@vger.kernel.org \
    --cc=law@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=longman@redhat.com \
    --cc=rientjes@google.com \
    --cc=serge@hallyn.com \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.