RE: Kernel 2.4.6: Why doesn't mprotect () check ulimit/rlim?

Rolf Fokkens (FokkensR@vertis.nl)
Fri, 13 Jul 2001 00:39:23 +0200


I'd expect the same and strace may have missed the preceding mmap. However
/proc/<PID>/maps shows all the mprotect results. Before the mprotect call
the memory doesn't show up in /proc/<PID>/maps which makes me the think
there hasen't been a prior mmap, brk or whatever.

-----Original Message-----
From: Mark Hahn [mailto:hahn@coffee.psychology.mcmaster.ca]
Sent: Friday, July 13, 2001 12:14 AM
To: Rolf Fokkens
Subject: Re: Kernel 2.4.6: Why doesn't mprotect () check ulimit/rlim?

> While trying to restrict Oracle's memory claims I tried a strace while
> making Oracle claim huge amounts of memory. It appears that Oracle claims
> all it's memory by calling mprotect, which (unlike brk ()) doesn't check
> rlim.

afaik, mprotect only modifies page protection; it doesn't allocate.
it's the preceeding mmap that should check limits.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/