Date: Sun, 23 Jul 2006 09:19:33 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Peter Jeremy <peterjeremy@optushome.com.au> Cc: Robert Watson <rwatson@freebsd.org>, freebsd-arch@freebsd.org Subject: Re: mlock(2) for ordinary users Message-ID: <20060723061933.GC1217@deviant.kiev.zoral.com.ua> In-Reply-To: <20060722235528.GI728@turion.vk2pj.dyndns.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060723061933.GC1217>