Mailinglist Archive: opensuse-kernel (80 mails)

< Previous Next >
Re: [opensuse-kernel] Bug in 11.4 kernel? - mmap() with MAP_NORESERVE failing [Chrome Google native client fails on Opensuse 11.4 64]
  • From: milan zimmermann <milan.zimmermann@xxxxxxxxx>
  • Date: Tue, 15 Nov 2011 01:30:27 -0600
  • Message-id: <>
Thanks Jeff / Michal:

It looks like based on your help in this thread, the Nacl/Chromium guys
filed a bug:

Thanks again for your help.

A few notes inline:

On Mon, Nov 14, 2011 at 4:15 AM, Michal Hocko <mhocko@xxxxxxx> wrote:


On Fri 11-11-11 13:03:17, milan zimmermann wrote:
Hi Jeff:


I realize both Nacl  and the test code now work on Opensuse 12.1 RC2
(as you pointed out and I tried as well yesterday), but it hindges on
the distro setting no "virtual memory" ulimit.

The question is why Nacl maps such a huge memory mapping with PROT_NONE.

I am not quite sure. One of the comments in the Nacl list is "Nacl
security depends on the ability to allocate 40GB of address space". I
think rather then me interpreting you may want to check the original

and the bug nacl filed based on this

So, if I understand correctly, if the Nacl code mmaps huge space
without checking "virtual memory" ulimit, Nacl will always be failing
on systems with ulimit set to a finite value;


On Thu, Nov 10, 2011 at 3:10 PM, Jeff Mahoney <jeffm@xxxxxxx> wrote:
On 11/10/2011 02:43 PM, milan zimmermann wrote:
On Thu, Nov 10, 2011 at 10:15 AM, Jeff Mahoney <jeffm@xxxxxxx>
wrote: On 11/10/2011 11:06 AM, milan zimmermann wrote:
On Wed, Nov 9, 2011 at 3:41 PM, Jeff Mahoney <jeffm@xxxxxxx>
The next line is the mmap, which with PROT_NONE is actually backed by
nothing since it's inaccessible.

for curiosity waht is PROT_NONE here, thanks:

The third column describes protections rwx if none is set it is
PROT_NONE. `p' stands for a private mapping.

ok, thanks

 7f0ad3de2000-7f1213de2000 ---p 00000000 00:00 0         # Here's the test

That is why I thought the user limit should be checked at the
point I actually use it (not during MAP_NORESERVE), but certainly
have little support for that :)

Please note that we are talking about a virtual memory which is
created during the mmap time.


If you want to check something at
runtime (when the mapping is used then you are looking for RSS limit
checking). Moreover, MAP_NORESERVE is not considered for the user limit
at all because ulimit is simply to enforce the size of the mapping and
doesn't care about usage of the mapping.

Michal, do you mean that ulimit should not be looked at when mmap has
MAP_NORESERVE? Ah, maybe not, sounds like you mean ulimit will always
be used and limit the mmap size no matter what mmap parameters?


Michal Hocko
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
To unsubscribe, e-mail: opensuse-kernel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-kernel+owner@xxxxxxxxxxxx

< Previous Next >