[OpenAFS-devel] keyring/pag support for linux
Jeffrey Hutzelman
jhutz@cmu.edu
Thu, 03 Aug 2006 00:31:24 -0400
On Wednesday, August 02, 2006 10:19:39 AM -0400 Derrick J Brashear
<shadow@dementia.org> wrote:
>> You could also use something like:
>>
>> # include <asm/unistd.h>
>>
>> static inline _syscall2(long, keyctl, int, option, void*, arg2)
>>
>> long serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING, NULL);
>
> Is keyctl() exported in the kernel now? Otherwise, this won't work for us.
No; you misunderstand. _syscall2() is a macro which emits the complete
definition of a 2-argument syscall. The above expands to something like
static inline long keyctl(int option, void* arg2) {
return _syscall(SYS_keyctl, option, arg2);
}
except the function body is slightly more complicated.
But like Chas, I don't expect that construct to work in the kernel.
> Don't. When a child changes a PAG, it's the child and its' children get
> the new one, and the parent is left alone.
In other words, this functionality is evil, and we all wish it'd just go
away, so being able to provide it is not a high priority.
-- Jeff