Subject: Process credentials change
To: None <>
From: Andrew Doran <>
List: tech-kern
Date: 07/10/2006 10:50:24
Hi all,

p->p_cred is one of the most widely passed about parts of the proc
structure. For MP locking purposes, giving each LWP a reference to the
credentials would avoid sprinkling locks all around the kernel. I want

1. maintain p_cred as the master copy
2. hold a reference to creds in each struct lwp
3. on syscall / user trap, update l->l_cred if (l->l_cred != p->p_cred)
4. use the LWP creds wherever sane
5. make accounting flags per-LWP and collate into struct proc on LWP exit

Any comments?