mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <mtk-manpages@gmx.net>
To: matthias.andree@gmx.de
Cc: "Theodore Ts'o" <tytso@mit.edu>,
	linux-kernel@vger.kernel.org, arjan@infradead.org,
	Joerg Schilling <schilling@fokus.fraunhofer.de>,
	michael.kerrisk@gmx.net
Subject: Re: Rationale for RLIMIT_MEMLOCK?
Date: Fri, 3 Feb 2006 21:49:20 +0100 (MET)	[thread overview]
Message-ID: <7554.1138999760@www048.gmx.net> (raw)

> > Matthias Andree <matthias.andree@gmx.de> wrote:

[...]

> The complete story is, condensed, and with return values, for a
> setuid-root application:
> 
>   geteuid() == 0;
>   mlockall(MLC_CURRENT|MLC_FUTURE) == (success);
>   seteuid(500) == (success);
>   valloc(64512 + pagesize) == NULL (failure);

[...]

A late follow-up to this thread. I've added the following text
to the mlockall() manual pag under BUGS:

    Since kernel 2.6.9, if a privileged process calls 
    mlockall(MCL_FUTURE) and later drops privileges
    (CAP_IPC_LOCK), then subsequent memory allocations
    (e.g., mmap(2), sbrk(2)) will fail if the 
    RLIMIT_MEMLOCK resource limit is encountered.
    
The change will be in man-pages 2.23.

Cheers,

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 

Want to help with man page maintenance?  
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/, 
read the HOWTOHELP file and grep the source 
files for 'FIXME'.

             reply	other threads:[~2006-02-03 20:49 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-03 20:49 Michael Kerrisk [this message]
     [not found] <5yddh-1pA-47@gated-at.bofh.it>
     [not found] ` <5ydni-1Qq-3@gated-at.bofh.it>
     [not found]   ` <5yek1-3iP-53@gated-at.bofh.it>
     [not found]     ` <5yeth-3us-33@gated-at.bofh.it>
     [not found]       ` <5yf5O-4iF-19@gated-at.bofh.it>
     [not found]         ` <5yfI4-5kU-11@gated-at.bofh.it>
     [not found]           ` <5ygDT-6LK-3@gated-at.bofh.it>
     [not found]             ` <5yscc-68j-5@gated-at.bofh.it>
     [not found]               ` <5ysvk-6JI-5@gated-at.bofh.it>
     [not found]                 ` <5ysvk-6JI-3@gated-at.bofh.it>
     [not found]                   ` <5yEn7-7Or-21@gated-at.bofh.it>
     [not found]                     ` <5yUUI-6JR-15@gated-at.bofh.it>
2006-01-26  0:12                       ` Bodo Eggert
  -- strict thread matches above, loose matches on Subject: below --
2006-01-23 10:56 Matthias Andree
2006-01-23 11:05 ` Arjan van de Ven
2006-01-23 16:54   ` Matthias Andree
2006-01-23 17:00     ` Arjan van de Ven
2006-01-23 18:01       ` Matthias Andree
2006-01-23 18:13         ` Arjan van de Ven
2006-01-23 18:55           ` Matthias Andree
2006-01-23 19:04             ` Arjan van de Ven
2006-01-23 19:38             ` Joerg Schilling
2006-01-23 20:30               ` Matthias Andree
2006-01-23 21:23                 ` Joerg Schilling
2006-01-23 22:05                   ` Matthias Andree
2006-01-24  8:52                 ` Arjan van de Ven
2006-01-24  9:08                   ` Joerg Schilling
2006-01-24  9:15                     ` Arjan van de Ven
2006-01-24  9:18                       ` Joerg Schilling
2006-01-24 21:28                       ` Theodore Ts'o
2006-01-24 23:19                         ` Edgar Toernig
2006-01-25 15:38                           ` Joerg Schilling
2006-01-24 23:26                         ` Matthias Andree
2006-01-24 23:27                           ` Matthias Andree
2006-01-25 15:33                         ` Joerg Schilling
2006-01-25 16:01                           ` Matthias Andree
2006-01-24 10:51                     ` Matthias Andree
2006-01-23 20:30               ` Lee Revell
2006-01-23 21:33                 ` Joerg Schilling
2006-01-23 19:57             ` Lee Revell
2006-01-23 21:34             ` Theodore Ts'o
2006-01-24 11:06               ` Matthias Andree

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=7554.1138999760@www048.gmx.net \
    --to=mtk-manpages@gmx.net \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.andree@gmx.de \
    --cc=michael.kerrisk@gmx.net \
    --cc=schilling@fokus.fraunhofer.de \
    --cc=tytso@mit.edu \
    /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®