All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Waiman Long <longman@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: dhowells@redhat.com, Johannes Weiner <hannes@cmpxchg.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	keyrings@vger.kernel.org,
	LSM List <linux-security-module@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] keys: Fix key->sem vs mmap_sem issue when reading key
Date: Sun, 05 Apr 2020 09:03:50 +0000	[thread overview]
Message-ID: <3567369.1586077430@warthog.procyon.org.uk> (raw)
In-Reply-To: <78ff6e5d-9643-8798-09cb-65b1415140be@redhat.com>

Waiman Long <longman@redhat.com> wrote:

> > And yes, kzfree() isn't a good name either, and had that same
> > memset(), but at least it doesn't do the dual-underscore mistake.
> >
> > Including some kzfree()/crypto people explicitly - I hope we can get
> > away from this incorrect and actively wrong pattern of thinking that
> > "sensitive data should be memset(), and then we should add a random
> > 'z' in the name somewhere to 'document' that".
> >
> >                Linus
> >
> Thanks for the suggestion, I will post a patch to rename the function to
> kvzfree_explicit() and use memzero_explicit() for clearing memory.

Should this be moved into core code, rather than being squirrelled away in
security/keys/?

David

WARNING: multiple messages have this Message-ID (diff)
From: David Howells <dhowells@redhat.com>
To: Waiman Long <longman@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: dhowells@redhat.com, Johannes Weiner <hannes@cmpxchg.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	keyrings@vger.kernel.org,
	LSM List <linux-security-module@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] keys: Fix key->sem vs mmap_sem issue when reading key
Date: Sun, 05 Apr 2020 10:03:50 +0100	[thread overview]
Message-ID: <3567369.1586077430@warthog.procyon.org.uk> (raw)
In-Reply-To: <78ff6e5d-9643-8798-09cb-65b1415140be@redhat.com>

Waiman Long <longman@redhat.com> wrote:

> > And yes, kzfree() isn't a good name either, and had that same
> > memset(), but at least it doesn't do the dual-underscore mistake.
> >
> > Including some kzfree()/crypto people explicitly - I hope we can get
> > away from this incorrect and actively wrong pattern of thinking that
> > "sensitive data should be memset(), and then we should add a random
> > 'z' in the name somewhere to 'document' that".
> >
> >                Linus
> >
> Thanks for the suggestion, I will post a patch to rename the function to
> kvzfree_explicit() and use memzero_explicit() for clearing memory.

Should this be moved into core code, rather than being squirrelled away in
security/keys/?

David


  parent reply	other threads:[~2020-04-05  9:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 12:16 [GIT PULL] keys: Fix key->sem vs mmap_sem issue when reading key David Howells
2020-03-30 12:16 ` David Howells
2020-04-04 20:00 ` Linus Torvalds
2020-04-04 20:00   ` Linus Torvalds
2020-04-05  3:10   ` Waiman Long
2020-04-05  3:10     ` Waiman Long
2020-04-05  9:03   ` David Howells [this message]
2020-04-05  9:03     ` David Howells
2020-04-05 17:31     ` Linus Torvalds
2020-04-05 17:31       ` Linus Torvalds
2020-04-06  2:38       ` Waiman Long
2020-04-06  2:38         ` Waiman Long
2020-04-04 20:05 ` pr-tracker-bot
2020-04-04 20:05   ` pr-tracker-bot

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=3567369.1586077430@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=torvalds@linux-foundation.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.