Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 05 Jan 2008 15:01:13 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Skip Ford <skip@menantico.com>
Cc:        Kostik Belousov <kostikbel@gmail.com>, freebsd-current@FreeBSD.org, Robert Watson <rwatson@FreeBSD.org>, Jason Evans <jasone@FreeBSD.org>, Poul-Henning Kamp <phk@FreeBSD.org>
Subject:   Re: sbrk(2) broken
Message-ID:  <86k5mo8j86.fsf@ds4.des.no>
In-Reply-To: <20080104145807.GC788@menantico.com> (Skip Ford's message of "Fri\, 04 Jan 2008 09\:58\:07 -0500")
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> <20080104135438.GA788@menantico.com> <20080104135912.GB57756@deviant.kiev.zoral.com.ua> <20080104141133.GB788@menantico.com> <20080104141857.GC57756@deviant.kiev.zoral.com.ua> <20080104145807.GC788@menantico.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Skip Ford <skip@menantico.com> writes:
> Kostik Belousov <kostikbel@gmail.com> writes:
> > - per-user RLIMIT_SWAP limit, that account the allocation by the uid. T=
his
> >   has some obvious problems with setuid(2) syscall. AFAIR, I ended up
> >   not moving the accounted numbers to the new uid.
> The concensus in this thread seems to be that a per-process limit needs to
> be implemented rather than, or in addition to, the per-uid limit you
> already have.

Implementing a per-process limit would help fix the setuid() problem,
since the usage of the process calling setuid() would be known and could
be transferred to the new user.  There could however be a problem when a
process creates a MAP_SHARED | MAP_ANON mapping, then fork()s, and the
child calls setuid() (think privilege separation).  Hopefully, this case
is rare enough (malloc() always uses MAP_PRIVATE) that it can be handled
using the most restrictive interpretation possible rather than trying to
be painstakingly precise.

(BTW, Skip, I find your MUA's use of Mail-Followup-To: offensive; if you
don't want a copy of the followup, set the followup address to the list,
not to a random previous participant in the thread)

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?86k5mo8j86.fsf>