From owner-freebsd-arch@FreeBSD.ORG Sun Jul 23 06:19:40 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BE57E16A4E2; Sun, 23 Jul 2006 06:19:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5E8643D46; Sun, 23 Jul 2006 06:19:39 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k6N6JY7l087733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 23 Jul 2006 09:19:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6) with ESMTP id k6N6JY5i050761; Sun, 23 Jul 2006 09:19:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.6/8.13.6/Submit) id k6N6JXD8050760; Sun, 23 Jul 2006 09:19:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 23 Jul 2006 09:19:33 +0300 From: Kostik Belousov To: Peter Jeremy Message-ID: <20060723061933.GC1217@deviant.kiev.zoral.com.ua> References: <20060721104044.GB728@turion.vk2pj.dyndns.org> <20060722154606.N54846@fledge.watson.org> <20060722151631.GB1217@deviant.kiev.zoral.com.ua> <20060722235528.GI728@turion.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="48TaNjbzBVislYPb" Content-Disposition: inline In-Reply-To: <20060722235528.GI728@turion.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=0.4 required=5.0 tests=ALL_TRUSTED, DNS_FROM_RFC_ABUSE,SPF_NEUTRAL autolearn=no version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on fw.zoral.com.ua Cc: Robert Watson , freebsd-arch@freebsd.org Subject: Re: mlock(2) for ordinary users 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: Sun, 23 Jul 2006 06:19:40 -0000 --48TaNjbzBVislYPb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 23, 2006 at 09:55:28AM +1000, Peter Jeremy wrote: > On Sat, 2006-Jul-22 18:16:31 +0300, Kostik Belousov wrote: > >On Sat, Jul 22, 2006 at 03:52:37PM +0100, Robert Watson wrote: > >As consequence, allowing mlock() for non-root users actually allow such > >user to allocate value-of(RLIMIT_MEMLOCK) * value-of(RLIMIT_NPROC). >=20 > This is no different to the other per-process resource limits. On a > stock FreeBSD system, I can reach the system-wide FD limit with two > user processes. I can't see that having several processes each > locking RLIMIT_MEMLOCK pages provides any real benefit to the user > so this is really just another DoS vector. >=20 > >In fact, I had to make the answers to the asked questions when I > >implemented the per-user swap limits. >=20 > I didn't realise this existed. How do you control per-user swap? I > can't find any reference to this in either login.conf or setrlimit(2). This is not in the tree. See http://people.freebsd.org/~kib/overcommit/index.html I would be more than happy if this stuff becomes useful for at least one purpose. --48TaNjbzBVislYPb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFEwxT1C3+MBN1Mb4gRApKNAKD1X2SNtY3Z5Piyom70Na8r3crFlACeKaI8 eQGOb4Gr+bj417hGHbn0lSo= =PWd1 -----END PGP SIGNATURE----- --48TaNjbzBVislYPb--