[wplug] OpenAFS: sys_call_table

Brandon Kuczenski brandon at 301south.net
Mon Dec 6 22:44:09 EST 2004


I've had this problem with every version of Linux I've run (which is, er,
two.)  OpenAFS is Carnegie Mellon's distributed filesystem of choice, but
it doesn't work on linux systems. The situation seems to be a religious
war between Linux and OpenAFS developers -- the former think exporting the
sys_call_table is dangerous and could allow outside programs to
unnecessarily muck about with the internals of the kernel; the AFS people
are annoyed that, though Linux won't support this, they also won't provide
any other means to access the system table.

The circumstances are like this: The openafs module (openafs.o) needs to
be compiled specially for custom kernels, except when doing so I get the
error message, "no available sys_call_table method".  I looked into this
quite a bit for my last install (Redhat 9, with Linux 2.4.22) and now
(Debian 3, Linux 2.6.8) I have the same problem, which I was hoping would
have gone away with the 2.6 kernel.  It hasn't.

I've read through the openafs-devel mailinglist for the last 3 years
(well, grepped for 'sys_call_table' would be more accurate) and the
best-simplest fix seems to be to patch the kernel to export the system
call table, and then build openafs on that kernel.  The patch is very
simple and looks something like this:

diff -Nru a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c
--- a/arch/i386/kernel/i386_ksyms.c	Sat Apr 10 19:20:22 2004
+++ b/arch/i386/kernel/i386_ksyms.c	Sat Apr 10 19:20:22 2004
@@ -206,3 +206,6 @@
 #endif

 EXPORT_SYMBOL(csum_partial);
+
+extern void *sys_call_table[];
+EXPORT_SYMBOL(sys_call_table);

EOF

My question is: is this an unsafe thing to do?  Openafs is fairly
"mission-critical" to me to demonstrate that Linux is at least not
inferior to windows in a work environment.  But I also don't want to do
anything stupid.

After that I'm just planning to use the debian make-kpkg tools (very
handy, so I'm told) to rebuild the kernel, reboot, and try again -- do I
need to rebuild modules or anything like that for such a simple change?

Wish me luck,
-Brandon



More information about the wplug mailing list