From owner-freebsd-arch@FreeBSD.ORG Thu May 17 05:54:28 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0541106566B; Thu, 17 May 2012 05:54:28 +0000 (UTC) (envelope-from BATV+8d16ce0fe61672f7c110+3189+infradead.org+hch@bombadil.srs.infradead.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:4830:2446:ff00:4687:fcff:fea6:5117]) by mx1.freebsd.org (Postfix) with ESMTP id 65A938FC16; Thu, 17 May 2012 05:54:28 +0000 (UTC) Received: from hch by bombadil.infradead.org with local (Exim 4.76 #1 (Red Hat Linux)) id 1SUtfN-0001Cp-Ew; Thu, 17 May 2012 05:54:25 +0000 Date: Thu, 17 May 2012 01:54:25 -0400 From: Christoph Hellwig To: Eitan Adler Message-ID: <20120517055425.GA802@infradead.org> References: <4FAC3EAB.6050303@delphij.net> <861umkurt8.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Cc: Dag-Erling Sm??rgrav , Adrian Chadd , d@delphij.net, freebsd-arch@freebsd.org Subject: Re: Allow small amount of memory be mlock()'ed by unprivileged process? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2012 05:54:28 -0000 On Wed, May 16, 2012 at 06:36:18PM -0400, Eitan Adler wrote: > On 16 May 2012 18:32, Adrian Chadd wrote: > > .. what's to stop a fork() bomb from grabbing all pages? > > + possibly limiting the number of pages per user, ?? la > maxprocperuid. Linux has added a RLIMIT_MEMLOCK opcode for setrlimit that allows controlling the amount of memory users can lock down, with a default of a single page for unprivilegued processes.