Re: sbrk(2) broken

From: Dag-Erling Smørgrav <des_at_des.no>
Date: Fri, 04 Jan 2008 13:34:33 +0100
Robert Watson <rwatson_at_FreeBSD.org> writes:
> Dag-Erling Smørgrav <des_at_des.no> writes:
> > Robert Watson <rwatson_at_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 == 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
-- 
Dag-Erling Smørgrav - des_at_des.no
Received on Fri Jan 04 2008 - 11:34:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:24 UTC