Subject: Re: Process credentials change
To: Christos Zoulas <>
From: Andrew Doran <>
List: tech-kern
Date: 07/11/2006 12:26:47
On Mon, Jul 10, 2006 at 10:57:37PM +0000, Christos Zoulas wrote:

> Seeing that credential changes happen rather infrequently, doesn't it
> make more sense to update the credential pointers of each lwp when the
> change is happening rather than upon each kernel entry?

What Jason said about locking. On an uniprocessor kernel we could do this,
but then we would have different semantics from MP (credentials can change
in-flight without threads explicitly requesting an update).

In the common case the change adds a test + branch to the syscall and trap
paths. As a minor plus it removes lots of dereferences of l->l_proc only to
get at p_cred.