From owner-freebsd-arch@FreeBSD.ORG Fri Oct 12 17:43:24 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E6EE3FB for ; Fri, 12 Oct 2012 17:43:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 413AB8FC08 for ; Fri, 12 Oct 2012 17:43:24 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8CD31B918; Fri, 12 Oct 2012 13:43:23 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Subject: Re: mmap and resource limits Date: Fri, 12 Oct 2012 13:38:28 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <83AE27A6-C844-4720-99E7-A12106F77227@xcllnt.net> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210121338.28956.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 12 Oct 2012 13:43:23 -0400 (EDT) Cc: Marcel Moolenaar X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2012 17:43:24 -0000 On Friday, October 12, 2012 12:04:19 pm Marcel Moolenaar wrote: > > On Oct 8, 2012, at 10:40 AM, Marcel Moolenaar 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