lkml.org 
[lkml]   [2008]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Increase the default RLIMIT_MEMLOCK
* Andrew Morton (akpm@linux-foundation.org) wrote:
> > --- include/linux/resource.h.orig 2008-04-27 21:15:47.000000000 +0200
> > +++ include/linux/resource.h 2008-04-27 21:23:06.000000000 +0200
> > @@ -58,10 +58,11 @@
> > #define _STK_LIM (8*1024*1024)
> >
> > /*
> > - * GPG wants 32kB of mlocked memory, to make sure pass phrases
> > - * and other sensitive information are never written to disk.
> > + * The biggest widespread mlocked memory consumer is
> > + * gnome-keyring-manager. It needs 256kB to make sure SSH/GPG
> > + * passphrases and network passwords are never written to disk.
> > */
> > -#define MLOCK_LIMIT (8 * PAGE_SIZE)
> > +#define MLOCK_LIMIT (64 * PAGE_SIZE)
>
> gee, it seems rather arbitrary. Perhaps we should have set it to zero on
> day one to _force_ distributors to set an appropriate RLIMIT_MEMLOCK in
> init.

Yes, it is fairly arbitrary. The motivation was gpg, but in fact when
the patchset started gpg had already changed from 1 page to 8 pages.

http://thread.gmane.org/gmane.linux.kernel/222613/focus=222681

> We can do this of course, but does it actually help anything? Perhaps it's
> actually a bad thing, permitting userspace developers to rely upon kernel
> defaults rather than setting things they way they should be set?

We don't want to keep changing at whim of random apps, agreed. Feels
like a distro issue, since kernel can't even know what apps might run,
and using 8 pages was just a courtesy hint to distros.

thanks,
-chris


\
 
 \ /
  Last update: 2008-05-02 03:15    [W:0.033 / U:49.412 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site