Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Feb 2008 21:38:42 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        Igor Sysoev <is@rambler-co.ru>, Jason Evans <jasone@freebsd.org>, freebsd-current@freebsd.org
Subject:   Re: malloc(3) ignores RLIMIT_DATA
Message-ID:  <20080219193842.GG57756@deviant.kiev.zoral.com.ua>
In-Reply-To: <20080219185615.R21494@fledge.watson.org>
References:  <20080219151809.GF57366@rambler-co.ru> <47BB0D29.5080403@freebsd.org> <20080219185615.R21494@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--NZdDWKHbmnyWnFtu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Feb 19, 2008 at 06:58:08PM +0000, Robert Watson wrote:
>=20
> On Tue, 19 Feb 2008, Jason Evans wrote:
>=20
> >>As sbrk() is less preferable because of framentation and race condition=
s,=20
> >>why not to create mmap() flag MMAP_DSS to check RLIMIT_DATA and to use =
it=20
> >>in malloc(3) ?
> >
> >There has been general agreement among the people I've discussed this=20
> >issue with that the correct solution is to add a separate resource limit=
=20
> >for anonymously mapped memory, which would provide capabilities similar =
to=20
> >what your suggestion would provide.
>=20
> Konstantine has updated his patches and reported on them in the recent=20
> status report:
>=20
>   http://www.freebsd.org/news/status/report-2007-10-2007-12.html#VM-Overc=
ommit
>=20
> Here's the main site for information on the patch:
>=20
>   http://people.freebsd.org/~kib/overcommit/
>=20
> He describes a per-uid limit, but I think it might also be useful to have=
 a=20
> per-process limit tht can also be enforced, although possibly not by=20
> default, so that protecting applications from each other doesn't require=
=20
> creating separate users for them.

Yes, per-process limits can be added too, although it would require some
additional thinking. The persistent objects backed by anonymous memory,
like SysV shm or shm_open(2) handles would be billed for the creator
only. It is not immediately obvious whether it is right or not.

Anyway, I want to get the review first, before doing further
modifications.


--NZdDWKHbmnyWnFtu
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (FreeBSD)

iEYEARECAAYFAke7MEEACgkQC3+MBN1Mb4ikQgCfZrnzQ+FjqJHniRl/1KTOILm7
ymUAoNZmzI/NfVMhASNHC07i2dT4MxDc
=7VSO
-----END PGP SIGNATURE-----

--NZdDWKHbmnyWnFtu--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080219193842.GG57756>