From owner-freebsd-arch@FreeBSD.ORG Fri May 18 15:24:23 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 F2EB81065670; Fri, 18 May 2012 15:24:23 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 8DDC08FC0A; Fri, 18 May 2012 15:24:17 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id q4IFO0Hp038306; Fri, 18 May 2012 11:24:00 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id q4IFNxJf038305; Fri, 18 May 2012 11:23:59 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Fri, 18 May 2012 11:23:59 -0400 From: David Schultz To: Eitan Adler Message-ID: <20120518152359.GA38257@zim.MIT.EDU> Mail-Followup-To: Eitan Adler , Adrian Chadd , Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , d@delphij.net, freebsd-arch@freebsd.org References: <4FAC3EAB.6050303@delphij.net> <861umkurt8.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Cc: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , 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: Fri, 18 May 2012 15:24:24 -0000 On Wed, May 16, 2012, 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. Two other points about this: - Each process already requires a number of wired pages in the kernel, so adding a few more in userland shouldn't be a big deal. - There are plenty of ways for an unprivileged user to wedge the system if they really try. ISTR alc commenting on a similar proposal years ago; I think at the time we didn't have appropriate accounting limits or something.