Subject: Re: Process credentials change
To: None <email@example.com>
From: Christos Zoulas <firstname.lastname@example.org>
Date: 07/10/2006 22:57:37
In article <8C051768-2648-46DC-89A3-22FA600CB5AC@shagadelic.org>,
Jason Thorpe <email@example.com> wrote:
>On Jul 10, 2006, at 1:39 PM, Bill Studenmund wrote:
>> My concerns are around what's going on if l->l_cred != p->p_cred.
>> Since a
>> process is supposed to have one credential state, if we ever change
>> p_cred, we REALLY need all the l_creds to change at the same time. And
>> that means a global lock.
>Unless you consider that an LWP entering the kernel is like a
>"transaction", and that the credential state should remain constant
>from the beginning to the end of the "transaction". Do you agree?
>If so, then it makes PERFECT sense to set the LWP's creds upon kernel
>entry, and not change those creds unless the LWP is requesting a cred
>change. That way, a cred change by the proc while the LWP sleeps
>(disk I/O?) won't screw up whatever the LWP is (legitimately) trying
>to do with the creds it started out with.
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?