[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Freestandards-ldps] Re: LDPS 0.91 - even closer to release



On Fri, Jul 28, 2000 at 02:41:32PM +0100, Alan Cox wrote:
> > CLONE_CRED would probably not be that hard, just changing LinuxThreads to 
> 
> Actually CLONE_CRED is incredibly hard and wont be changing in the near
> future. Think about all the code using current->euid without locks. Its 
> perfectly possible to emulate that abortion in the library since Ive never
> seen a performance critical example

I don't see the problem. When they are using it without locks in user space
the behavior is undefined anyways (the set*id may have appeared before
or after the file access). When there are other locks everything is ok.
You only need reference counting in the cred structure to make sure that 
it won't go away until the last task sharing it exists. For external
events (signals etc.) you don't need any additional locking neither,
because the normal locking of the task (grabbing exit_sem, task list lock etc.)
is enough.

Defining euid etc. as a macro is a bit ugly, but possible. Changing that
with search-n-replace wouldn't be very hard.


-Andi



Reply to: