[OpenAFS] token and linux "access key retention"?

David Howells dhowells@redhat.com
Wed, 27 May 2009 12:37:15 +0100


Andreas Hirczy <ahi@itp.tugraz.at> wrote:

> May 27 08:15:42 faeppc02 kernel: kernel BUG at kernel/cred.c:360!
> ...
> May 27 08:15:42 faeppc02 kernel: EIP is at commit_creds+0x24/0x12c
> ...
> May 27 08:15:42 faeppc02 kernel:  [<c016c20b>] ? sys_faccessat+0x90/0x14a

The problem is that sys_faccessat() overrides the current credentials of the
task with slightly modified ones before calling into the filesystem. You're
then calling commit_creds() which would otherwise revert that change, and so
commit_creds() throws an assertion failure:

	BUG_ON(task->cred != task->real_cred);

I have a series of about 150 patches standing at about 5MB in size to pass the
effective creds down through the function calls rather than stashing it in the
task_struct, but it's quite icky, especially when it comes to dealing with
ioctl...

What exactly is crset() doing at the moment?

David