lkml.org 
[lkml]   [2008]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/3] KEYS: Don't generate user and user session keyrings unless they're accessed
Date
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


\
 
 \ /
  Last update: 2008-03-14 03:39    [W:0.046 / U:2.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site