[OpenAFS-devel] Re: openafs linux-kernelmodule not buildable on sparc

Marcus Watts mdw@umich.edu
Sun, 25 Feb 2007 23:38:04 -0500


...
> insmod /usr/src/openafs-1.4.3rc2/src/libafs/MODLOAD-2.6.18-3-sparc64-SP/libafs-2.6.18-3-sparc64.ko
> libafs: module license 'http://www.openafs.org/dl/license10.html' taints
> kernel.
> Found system call table at 0x488ac8 (compiled-in)
> Found 32-bit system call table at 0x416000 (exported)
>               \|/ ____ \|/
>               "@'/ .. \`@"
>               /_| \__/ |_\
>                  \__U_/
> udevd(2206): Kernel illegal instruction [#1]
> TSTATE: 0000004411009604 TPC: 0000000000488c08 TNPC: 0000000000488c0c Y:
> 00000000    Tainted: P
> TPC: <get_unused_fd+0x88/0xd8>
> g0: 000000000000ff00 g1: 00000000000001ff g2: 0000000000000100 g3:
> 0000000000000000
> g4: fffff8003fc99220 g5: 000000616464402f g6: fffff8003e848000 g7:
> fffff8003fc5c140
> o0: 0000000000000000 o1: 0000000000000008 o2: 0000000000000000 o3:
> fffff8003dd63000
> o4: 000000000000ff00 o5: 0000000000000009 sp: fffff8003e84b521 ret_pc:
> 0000000000488bc4
> RPC: <get_unused_fd+0x44/0xd8>
> l0: fffff8003fc5c0f0 l1: fffff8003fc5c0e0 l2: 0000000000000008 l3:
> 0000000000000040
> l4: 0000000000000008 l5: fffff8003f465250 l6: fffff8003f465248 l7:
> fffff8003f465240
> i0: 0000000000000008 i1: fffff8003fca65a0 i2: fffff8003e84be40 i3:
> 0000000000000a00
> i4: fffff8003f9e46c0 i5: fffff8003f465238 i6: fffff8003e84b5e1 i7:
> 0000000000488f3c
> I7: <do_sys_open+0x28/0xe4>
> Caller[0000000000488f3c]: do_sys_open+0x28/0xe4
> Caller[00000000004069d4]: linux_sparc_syscall32+0x3c/0x40
> Caller[0000000000000000]: 0x8
> Instruction DUMP: a72e3003  82104002  c271c003 <1021b990> c259c003
> 1021b904  c471c003  da246050  c25c2008
> root@paulus:~#               \|/ ____ \|/

What happens if you do "modprobe libafs" by hand?  Does it die when
the module is loaded?  Or soon after when afsd is run?  I'm guessing
it dies right away.

I wonder what address the module loaded at?
in theory "insmod" ought to tell you.  maybe try
insmod -m /usr/src/openafs-1.4.3rc2/src/libafs/MODLOAD-2.6.18-3-sparc64-SP/libafs-2.6.18-3-sparc64.ko

or even before insmod, do
sort /proc/ksyms
and see what pattern other load modules and the base system follow.
On i386, the base kernel might load at c0000000 & modules somewhere
after f880d000.   sparc64 does something different.

S390x & sparc64 use "32-bit" syscall tables.  s390x has
"syscall_jump_code" which appears to be a stub which
transfers to the real thing.  sparc64 doesn't check for
problems and doesn't have jump code.  If code loads above
4Gb, it won't work.

				-Marcus Watts