[OpenAFS-devel] OpenAFS + LInux 2.6 + PAGs

Jason McCormick jasonmc@cert.org
Mon, 18 Oct 2004 10:06:42 -0400


Hello all.  I'm attempting to compile a Kernel and OpenAFS package that
will fully support PAGs on Linux 2.6 (Fedora 2).  From my understanding of
the situation, recompiling the kernel to export sys_call_table is what's
necessary on the kernel side to support PAGs.  Based on some reading I've
done in openafs-devel the only thing that I think I need to add to the
kernel compile to accomplish this is patching arch/i386/kernel/i386_ksyms.c
to include:

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

Simply doing this causes autoconf (in OpenAFS) to report that it cannot
find the sys_call_table:

#  ./configure --enable-redhat-buildsys
--with-linux-kernel-headers=/lib/modules/2.6.8-1.521.CERT/build/
.
.
.
configure: error: no available sys_call_table access method

An inspection of config.log reports the following:

configure:7122: gcc -c -g -O2
-I/lib/modules/2.6.8-1.521.CERT/build//include -I/
lib/modules/2.6.8-1.521.CERT/build//include/asm/mach-default -D__KERNEL__
conft
est.c >&5
In file included from conftest.c:26:
/usr/include/linux/modversions.h:1:2: #error Modules should never use
kernel-hea
ders system headers,
/usr/include/linux/modversions.h:2:2: #error but rather headers from an
appropri
ate kernel-source package.
/usr/include/linux/modversions.h:3:2: #error Change
-I/usr/src/linux/include (or
 similar) to
 /usr/include/linux/modversions.h:4:2: #error -I/lib/modules/$(uname
-r)/build/in
 clude
 /usr/include/linux/modversions.h:5:2: #error to build against the
currently-runn
 ing kernel.
 
  I've also tried building this w/o the --enable-redhat-buildsys and I get
slightly different behavior:


# ./configure
--with-linux-kernel-headers=/lib/modules/2.6.8-1.521.CERT/build/
.
.
checking if kernel uses MODVERSIONS... no
checking which kernel modules to build... MP SP
configure: WARNING: Cannot determine sys_call_table status. assuming it
isn't exported

But autoconf continues on its merry way and completes.  When I look in
config.log, I see nothing beyond:

configure:6586: result: no
configure:6588: checking which kernel modules to build
configure:6655: result: MP SP
configure:6661: WARNING: Cannot determine sys_call_table status. assuming
it isn't exported

This opens up several questions:

  1.  Is my method of exporting the sys_call_table correct?

  2.  Is there a bug in the autoconf test?  I would expect to see some sort
of failed test rather than just a line in config.log.  With the
--enable-redhat-buildsys I see a test with errors, but I'm also thinking
that with the "new" way to build the kernel in Fedora this isn't necessary.
So I'm assuming I've not exported the sys_call_table correctly, but I want
to make sure I'm not chasing down the wrong problem.

  Thanks in advance.  Sorry if this is simplistic, but I'm just getting
into this problem and I'm not a kernel hacker.  I've tried this both with
CVS HEAD and the 1.3.72 release.

-- 
Jason McCormick
CERT Infrastructure Team
jasonmc@cert.org