lkml.org 
[lkml]   [1998]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: "per-process" limits (was: Showstopper list)
Andi Kleen wrote:

> currently credentials like gids/uid/euid etc. are thread local, not
> process local in Linux. This differs from all other Unixes (Solaris,
> UnixWare etc.)

... but it is the same as Windows NT! This HAS to be fixed! :-)

Just my thought on this: I think it is quite a useful feature to be able
to change the uid of a thread. Otherwise if you want to check the
access permissions on a file (for example) you have to block all other
threads. Otherwise they find that their access rights change
unexpectedly -- not good.

That said, Linux must first and foremost be POSIX compliant. I suppose
this means that if you change the uid in the normal way you must get the
POSIX behaviour. One possibility would be to add a new set of calls,
for example:

pthread_seteuid_np()
pthread_setuid_np()

and so on. It may well be possible to do all this in the C library,
rather than in the kernel.

If I get time I will implement this (if people think it is a good idea),
but it will not be for a couple of months.

Incidentally the other problem in this area is that according to POSIX
all threads should have the same pid. Apparently Linux does not do this
at the moment because the CLONE_PID flag is not considered to be
reliable. Does anyone know why it is not reliable, and what is involved
in fixing it?

The other feature of NT that I quite like is fibres. A "fibre" is a
user level thread which runs in one particular kernel level thread.
This means that you have a choice of lightweight or heavyweight
threads. Obviously both have advantages in different situations, and
this system means that you can choose, or come up with a mixed scheme if
that works better.

-----------------------------------------------------------------------
Pete Chown, email pc@skygate.co.uk, phone +44 (0) 181 680 8393,
fax +44 (0) 181 680 8474, mobile +44 (0) 468 765 645,
post 58 Foss Avenue, Croydon, CR0 4EU, England

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.432 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site