From: Andi Kleen <[EMAIL PROTECTED]> > Alan Cox <[EMAIL PROTECTED]> writes: > > > > 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. > > > > no. People assume it cant change during a syscall > > There is nothing I could find in Single Unix nor in POSIX that requires that. > > Who assumes that ? And if they do, do they assume the current per-thread > cred model too?
I have to agree with Andi. I've not encountered anything in any of the specs which require that the effective UID cannot change during a system call. And the only way that assumption can be made is if there are per-thread credentials, and that is definitely not required by POSIX. In AIX (and this is public knowledge -- it's published in the various kernel programming texts as well as taught in our kernels classes) we take a reference against the credentials structure for the duration of their use. When that reference is no longer needed, it's freed. Other threads may have other credentials during the execution of that first thread's kernel code. -- Julie.
