[Linux-ia64] Problem with call across kernel modules

From: MONTGOMERY,BOB (HP-FtCollins,ex1) <bob.montgomery_at_hp.com>
Date: 2003-01-18 10:28:51
The attached files (in a shell archive) illustrate a problem with
calls between kernel modules on ia64 linux.

The problem was verified on two ia64 systems: insmod version 2.4.22
on RedHat's 2.4.18-e.12smp, and insmod version 2.4.21 on a 2.4.21-pre3
kernel.

The Makefile makes two modules: caller.o and helper.o.  The caller module
calls the function helper from its init_module routine.  The helper
function is in the helper module.  Making the call from init_module is a
simplification for the example.  The original problem made the bad call
after the module was successfully loaded.

If you insmod caller.o first, it will fail with an unresolved symbol
for helper, as expected.

After insmod'ing helper, the insmod of caller is expected to succeed,
but the call to helper from init_module causes an Oops.  The oops
message seems to indicate that the procedure call to helper lands at
the wrong address.  The ISR 4294967296 (or 0x1 0000 0000) indicates
the x bit (Execute exception - Interruption is associated with an
instruction fetch).

The ip register is:
   ip  : [<0880210040004000>] 

The two cases that discovered the problem reported 0000058014494800 and
000005800e293010 for their ip registers (same ISR).  My test case does
work on a 2.4.18 ia32 box.

# insmod caller.o
caller.o: unresolved symbol helper
# insmod helper.o
# dmesg
...
helper initialized
# insmod caller.o
Segmentation fault
# dmesg | tail -40
...
helper initialized
caller in init_module, about to call helper...
Unable to handle kernel paging request at virtual address 0880210040004000
insmod[1400]: Oops 4294967296
--> Using_Versions [] 0x40003fff <-- 

Pid: 1400, comm:               insmod
psr : 0000101008026018 ifs : 8000000000000002 ip  : [<0880210040004000>]
Not tainted
unat: 0000000000000000 pfs : 0000000000000185 rsc : 0000000000000003
rnat: e0000040f77c7d50 bsps: e0000040f77c0000 pr  : 000000000000a559
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c0270033f
b0  : a000000000354110 b6  : 088021004000400a b7  : 0000000000000000
f6  : 1003e000000000000000a f7  : 1003e0a3d70a3d70a3eb8
f8  : 1003ee0000000049f0400 f9  : 10003c000000000000000
r1  : 0004000000420020 r2  : 0000000000000000 r3  : 0000000000000000
r8  : 0000000000000032 r9  : 0000000000000018 r10 : 0000000000000000
r11 : 0000000000000a17 r12 : e0000040f77c7d90 r13 : e0000040f77c0000
r14 : 0000000000004000 r15 : a00000000034c0c8 r16 : 088021004000400a
r17 : e0000040fc790048 r18 : 0000000000080000 r19 : e0000000049f0d30
r20 : e0000040fc790050 r21 : e0000000049f0408 r22 : e0000040f77c0000
r23 : e0000000049f0d28 r24 : e0000040fc790040 r25 : e0000040fc790058
r26 : 200000000029fd58 r27 : ffffffffffffffff r28 : 0000000000000000
r29 : 0000000000000001 r30 : 0000000000000018 r31 : 0000000000000c9e

Call Trace: [<e000000004414870>] sp=0xe0000040f77c7980
bsp=0xe0000040f77c1218
decoded to show_stack [kernel] 0x50 
[<e0000000044150a0>] sp=0xe0000040f77c7b40 bsp=0xe0000040f77c11b8
decoded to show_regs [kernel] 0x7c0 
[<e00000000442e490>] sp=0xe0000040f77c7b60 bsp=0xe0000040f77c1190
decoded to die [kernel] 0x190 
[<e000000004450180>] sp=0xe0000040f77c7b60 bsp=0xe0000040f77c1130
decoded to ia64_do_page_fault [kernel] 0x780 
[<e00000000440dec0>] sp=0xe0000040f77c7bf0 bsp=0xe0000040f77c1130
decoded to ia64_leave_kernel [kernel] 0x0 




Received on Fri Jan 17 15:29:04 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:11 EST