mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@sous-sol.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Josselin Mouette <joss@debian.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Increase the default RLIMIT_MEMLOCK
Date: Thu, 1 May 2008 18:12:43 -0700	[thread overview]
Message-ID: <20080502011233.GB4018@sequoia.sous-sol.org> (raw)
In-Reply-To: <20080501175037.01d8d3dc.akpm@linux-foundation.org>

* 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

      reply	other threads:[~2008-05-02  1:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 19:26 Josselin Mouette
2008-05-02  0:50 ` Andrew Morton
2008-05-02  1:12   ` Chris Wright [this message]

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=20080502011233.GB4018@sequoia.sous-sol.org \
    --to=chrisw@sous-sol.org \
    --cc=akpm@linux-foundation.org \
    --cc=joss@debian.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®