[OpenAFS] suggestion for linux kernel modules

Joe Buehler jbuehler@spirentcom.com
Wed, 02 Nov 2005 09:13:31 -0500


We have a half-dozen different kernel versions here.  After running
into some problems with kernels named the same but requiring different
AFS modules (I think it was 586 vs 686 or similar), I started naming
the modules based on the content of /proc/ksyms on the build machine.

Here is what I use to compute a checksum of the kernel symbols:

    awk 'NF==2' /proc/ksyms | md5sum | awk '{print $1}'

The NF==2 strips out the symbols associated with loaded modules,
leaving only the symbols associated with the kernel itself.

To avoid changing the afs startup script, I hard-link at install time
from the built module name to the name that the script expects,
based on the same /proc/ksyms computation on the target machine.

Including all the kernel symbols in the checksum is obviously overkill,
but my point is I suppose that the current 1.4 scheme of using uname
output for selecting a module is flawed and the module name should
really be based on more detailed kernel information.
-- 
Joe Buehler