Date: Fri, 12 Oct 2012 13:38:28 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-arch@freebsd.org Cc: Marcel Moolenaar <marcel@xcllnt.net> Subject: Re: mmap and resource limits Message-ID: <201210121338.28956.jhb@freebsd.org> In-Reply-To: <FD8885CC-6E66-435A-A858-82F41B0F239D@xcllnt.net> References: <83AE27A6-C844-4720-99E7-A12106F77227@xcllnt.net> <FD8885CC-6E66-435A-A858-82F41B0F239D@xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, October 12, 2012 12:04:19 pm Marcel Moolenaar wrote: > > On Oct 8, 2012, at 10:40 AM, Marcel Moolenaar <marcel@xcllnt.net> wrote: > > > All, > > > > What's the progress of mmap(2) doing resource accounting and > > it respecting resource limits? > > *silence* > > Ok, so no new progress. We're still not doing it and we don't > have an idea of how we want to do it if or when we're going to > want to do it. Consequently: we still need brk()/sbrk(). > > Correct assessment? Well. You can use RLIMIT_AS, but that includes anything you map, not just malloc(). The problem is that even if you use sbrk() and rely on RLIMIT_DATA, any misbehaving app can just use mmap(MAP_ANON) or shm_open() to get around that. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210121338.28956.jhb>