public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: dhowells@redhat.com, torvalds@linux-foundation.org,
	kwc@citi.umich.edu, arunsr@cse.iitk.ac.in, dwalsh@redhat.com,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] KEYS: Don't generate user and user session keyrings unless they're accessed
Date: Fri, 14 Mar 2008 02:30:20 +0000	[thread overview]
Message-ID: <4243.1205461820@redhat.com> (raw)
In-Reply-To: <20080313152059.90681241.akpm@linux-foundation.org>

Andrew Morton <akpm@linux-foundation.org> wrote:

> hm, I didn't realise that the keys code had special knowlege of "root". 
> How does that play alongside the containers stuff?

The containers stuff lacks a keys container.  I'll have to attend to that at
some point.

The key code didn't so much have special knowledge of root, as UID 0 is
compiled into the kernel in various ways.

> would be more conventional.
> 
> But better would be to teach alloc_uid() about kmem_cache_zalloc() then
> take a chainsaw to it.

Yeah, I was thinking that.  That'd allow a slew of initialisations-to-zero to
be removed from that function, as indeed you have done in your attached patch.

> From: Andrew Morton <akpm@linux-foundation.org>
> 
> Use kmem_cache_zalloc(), remove large amounts of initialsiation code and
> ifdeffery.

"initialisation" perchance? :-)

> Note: this assumes that memset(*atomic_t, 0) correctly initialises the
> atomic_t.  This is true for all present archtiectures and if it becomes false
> for a future architecture then we'll need to make large changes all over the
> place anyway.
> 
> 
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Acked-by: David Howells <dhowells@redhat.com>

David

  reply	other threads:[~2008-03-14  2:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 19:14 [PATCH 1/3] KEYS: Allow clients to set key perms in key_create_or_update() David Howells
2008-03-13 19:14 ` [PATCH 2/3] KEYS: Don't generate user and user session keyrings unless they're accessed David Howells
2008-03-13 22:20   ` Andrew Morton
2008-03-14  2:30     ` David Howells [this message]
2008-03-13 19:14 ` [PATCH 3/3] KEYS: Make the keyring quotas controllable through /proc/sys David Howells
2008-03-13 22:28   ` Andrew Morton
2008-03-14  2:39     ` David Howells
2008-03-14 11:46     ` David Howells
2008-03-13 22:47   ` Andrew Morton
2008-03-14  2:30     ` David Howells
2008-03-19  0:04   ` Andrew Morton
2008-03-19 11:19     ` David Howells

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=4243.1205461820@redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arunsr@cse.iitk.ac.in \
    --cc=dwalsh@redhat.com \
    --cc=kwc@citi.umich.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox