[lkml]   [2007]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Credentials test patch
David Howells <> wrote:

> (1) Permit one process to change another process's cred struct. This means
> that a process wishing to read its own creds must use RCU read to do so,
> and a lock must be held when replacing the cred struct.

Having thought about this some more, I've realised that this also doesn't work
if when one thread tries to alter another thread's creds that other thread's
cred struct is currently overridden.

> (2) Explicitly update the cred struct on entry to syscalls that might want to
> use it.

So, I think this has to be the best way to do things. It's the cleanest,
certainly and probably has the lowest overhead overall.

This also means that I don't need that horrible __current_cred() function that
Linus so objects to (I do too).

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-09-17 17:31    [W:0.126 / U:0.952 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site