[OpenAFS-devel] OpenAFS Development
Tomas Olsson
tol@stacken.kth.se
28 Jun 2004 00:30:41 +0200
Jack Neely <jjneely@pams.ncsu.edu> writes:
> Tomas, can you shed some light on how the code in
> nnpfs_syscalls-lossage.c works? I understand how the code in
> osi_modules.c calculates the start of the sys_call_table but your's is
> getting the better of me.
>
If you can read osi_module I'd expect you to understand any code in no
time... Anyway, the assumption is that all entries in the table are within
the kernel space between some symbol and where we're at right now. If we
find "enough" consecutive such pointers (looks_good()), it might be the
table. Verify by checking that some duplicates (not implemented) are
there.
This breaks if the table has already been patched, afs_syscall will be
outside the assumed range. I liked using kallsyms_is_equal() in looks_good
better, but we cut that when fedora un-exported kallsyms.
Clearer now?
Btw, there's new code in arla HEAD now.
> The two hooks task_alloc_security and task_free_security are perfect.
>
I didn't implement the task_reparent_to_init (daemonize) hook. What are the
expected semantics, just keep the pag?
> The quirk is that you can "stack" these security modules...but only with
> the cooperation of the modules below you on the stack.
>
Would it be possible to convince them to allow several LSMs to register,
chained? Get a handler for managing the 'security' task field for all
LSMs, call them in the order they registered, if one says 'no' the answer
is 'no'. Or does this clash with the ideas behind the LSM system?
> Fedora Core 2 comes with SELinux and Capabilities build directly into
> the kernel.
>
Well, selinux can be disabled with a boot flag, but AFAIK capabilities
only understands its 'disable' flag when loaded as a module. The syscall
hack will live a while longer. Unfortunately.
/Tomas