Thanks Jeff / Michal: It looks like based on your help in this thread, the Nacl/Chromium guys filed a bug: http://code.google.com/p/nativeclient/issues/detail?id=2438 Thanks again for your help. A few notes inline: On Mon, Nov 14, 2011 at 4:15 AM, Michal Hocko <mhocko@suse.cz> wrote:
Hi,
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 post https://groups.google.com/forum/#!msg/native-client-discuss/7DUFfi_BxqM/36Gw... and the bug nacl filed based on this http://code.google.com/p/nativeclient/issues/detail?id=2438
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;
true
On Thu, Nov 10, 2011 at 3:10 PM, Jeff Mahoney <jeffm@suse.de> wrote:
On 11/10/2011 02:43 PM, milan zimmermann wrote:
On Thu, Nov 10, 2011 at 10:15 AM, Jeff Mahoney <jeffm@suse.de> wrote: On 11/10/2011 11:06 AM, milan zimmermann wrote:
> On Wed, Nov 9, 2011 at 3:41 PM, Jeff Mahoney <jeffm@suse.de> [...] 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 mmap
[...]
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.
yes
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? Thanks milan
[...] -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic
-- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org