public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: Chris Wright <chrisw@osdl.org>
Cc: linux-kernel@vger.kernel.org, torvalds@osdl.org, akpm@osdl.org
Subject: Re: mlock as non-root: use rlimits
Date: Sat, 5 Jun 2004 08:59:27 +0200	[thread overview]
Message-ID: <20040605065926.GB10001@devserv.devel.redhat.com> (raw)
In-Reply-To: <20040604111804.T22989@build.pdx.osdl.net>

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

On Fri, Jun 04, 2004 at 11:18:04AM -0700, Chris Wright wrote:
> The hugetlbfs and SHM_LOCK bits don't work well with rlimits.  For
> example, it's trivial to corrupt the locked_vm count with a SHM_LOCK
> segment.  I like this, but I think it only works with mlock().  Did I
> miss something?

Hmm I really wanted this rlimit to move to the struct user, but afaik that
work hasn't been merged yet. Once that is done it's easy to fix the SHM
stuff, just keep track of the struct user to which it's accounted. But you
are right, the count can go bonkers if another process unlocks is than that
locked it.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      reply	other threads:[~2004-06-05  6:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-04 11:28 mlock as non-root: use rlimits Arjan van de Ven
2004-06-04 15:12 ` Arjan van de Ven
2004-06-04 18:18   ` Chris Wright
2004-06-05  6:59     ` Arjan van de Ven [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=20040605065926.GB10001@devserv.devel.redhat.com \
    --to=arjanv@redhat.com \
    --cc=akpm@osdl.org \
    --cc=chrisw@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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