Messages in this thread | | | From | David Howells <> | 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 |
| |
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
| |