Date: Fri, 04 Jan 2008 13:34:33 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Robert Watson <rwatson@FreeBSD.org> Cc: freebsd-current@freebsd.org, Jason Evans <jasone@freebsd.org>, Poul-Henning Kamp <phk@FreeBSD.org> Subject: Re: sbrk(2) broken Message-ID: <86r6gxahwm.fsf@ds4.des.no> In-Reply-To: <20080104110511.S77222@fledge.watson.org> (Robert Watson's message of "Fri\, 4 Jan 2008 11\:06\:03 %2B0000 \(GMT\)") References: <477C82F0.5060809@freebsd.org> <863ateemw2.fsf@ds4.des.no> <20080104002002.L30578@fledge.watson.org> <86wsqqaqbe.fsf@ds4.des.no> <20080104110511.S77222@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Robert Watson <rwatson@FreeBSD.org> writes: > Dag-Erling Sm=C3=B8rgrav <des@des.no> writes: > > Robert Watson <rwatson@FreeBSD.org> writes: > > > The right answer is presumably to introduce a new LIMIT_SWAP, which > > > limits the allocation of anonymous memory by processes, and size it to > > > something like 90% of swap space by default. > > Not a good solution on its own. You need a per-process limit as > > well, otherwise a malloc() bomb will still cause other processes to > > fail randomly. > That was what I had in mind, the above should read RLIMIT_SWAP. You don't want the default to be so high. You want a low default, with the possibility for the admin to increase the limit for a particular user in login.conf or similar without rebooting (which is currently not possible since the default datasize =3D=3D maxdsiz, which can only be changed in the kernel config or loader.conf) You may also want to have a collective limit for unprivileged users, so root will still be able to log in if something goes wrong. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86r6gxahwm.fsf>