public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] Kernel dumps stacks while calling exported function from a loadable module
@ 2002-08-20  9:52 Jeff Lee
  2002-08-20 11:11 ` Matthew Wilcox
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jeff Lee @ 2002-08-20  9:52 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]

Hello everyone, 

I am having trouble in calling exported functions on my RH 7.2 box.
running 2.4.9-18 kernel.  The calling module causes kernel stack dumps
with messages like this:

insmod[1508]: Unimplemented Instruction Address fault 4398046511120
Using_Versions [] 0x2047fff <-- 
::

My modules are really trivial.  The one exported a dummy function is
listed below:

void dummy(void)
{
  printk("Dummy is called!\n");
}

int init_module(void)      
{ 
  printk("<1>Hello, world\n"); 
  return 0; 
}

And the calling module looks like this:

extern void dummy(void);

int init_module(void)      
{ 
  printk("<00>Hello, world\n"); 
  dummy();
  printk("done\n"); 
  return 0; 
}


The compilation line looks like this:

/opt/gcc3.1/bin/gcc -c -DLINUX -D__SMP__ -D"__BOOT_KERNEL_SMP=1"
-D"__BOOT_KERNEL_UP=0"  -O2 -Wall -Wstrict-prototypes  -D__ia64__ -D_LP64
-ffixed-r13 -mfixed-range=f10-f15,f32-f127 -falign-functions=32
-fno-common -Wno-unused -mb-step -I -I/usr/src/linux-2.4/drivers/scsi -I
-I/scsi  -I/usr/src/linux-2.4/drivers/scsi -DMODULE -DMODVERSIONS -include
/usr/src/linux-2.4/include/linux/modversions.h-D__KERNEL__  myhello1.c

The module that exports function loads without any problems but the
calling module fails.  

Any input regarding this matter is greatly appreciated.


Jeff Lee


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 10876 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-ia64] Kernel dumps stacks while calling exported function from a loadable module
  2002-08-20  9:52 [Linux-ia64] Kernel dumps stacks while calling exported function from a loadable module Jeff Lee
@ 2002-08-20 11:11 ` Matthew Wilcox
  2002-08-20 11:22 ` Richard Hirst
  2002-08-20 11:41 ` Jeff Lee
  2 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2002-08-20 11:11 UTC (permalink / raw)
  To: linux-ia64

On Tue, Aug 20, 2002 at 05:52:32PM +0800, Jeff Lee wrote:
> I am having trouble in calling exported functions on my RH 7.2 box.
> running 2.4.9-18 kernel.  The calling module causes kernel stack dumps

My understanding is that this kernel was compiled with gcc 2.96 ...

> The compilation line looks like this:
> 
> /opt/gcc3.1/bin/gcc -c -DLINUX -D__SMP__ -D"__BOOT_KERNEL_SMP=1"
> -D"__BOOT_KERNEL_UP=0"  -O2 -Wall -Wstrict-prototypes  -D__ia64__ -D_LP64
> -ffixed-r13 -mfixed-rangeñ0-f15,f32-f127 -falign-functions2
> -fno-common -Wno-unused -mb-step -I -I/usr/src/linux-2.4/drivers/scsi -I
> -I/scsi  -I/usr/src/linux-2.4/drivers/scsi -DMODULE -DMODVERSIONS -include
> /usr/src/linux-2.4/include/linux/modversions.h-D__KERNEL__  myhello1.c

... and you're using gcc 3.1, so maybe this compiler mismatch is causing
the problem?

-- 
Revolutions do not require corporate support.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-ia64] Kernel dumps stacks while calling exported function from a loadable module
  2002-08-20  9:52 [Linux-ia64] Kernel dumps stacks while calling exported function from a loadable module Jeff Lee
  2002-08-20 11:11 ` Matthew Wilcox
@ 2002-08-20 11:22 ` Richard Hirst
  2002-08-20 11:41 ` Jeff Lee
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Hirst @ 2002-08-20 11:22 UTC (permalink / raw)
  To: linux-ia64

On Tue, Aug 20, 2002 at 07:41:47PM +0800, Jeff Lee wrote:
> My kernel was from the RH installation CD.  I haven't touched it yet.
> 
> I used gcc3.1 for a reason: the 2.96 gcc causes the same problem; hence I tried gcc3.1 but that doesn't seem to matter,
> 
> Actually, I tried a little experiment.  I printed the address of dummy() out;  surprisingly, the reading of dummy() is different in the exporting module from the calling module (no wonder the kernel stacks).  But, any other global variables look fine.  
> 
> What so special about the kernel function symbols in IA 64?

A pointer to a function on ia64 is actually a pointer to a struct
containing the address of the function and the data pointer to use in
the function.

Richard



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [Linux-ia64] Kernel dumps stacks while calling exported function from a loadable module
  2002-08-20  9:52 [Linux-ia64] Kernel dumps stacks while calling exported function from a loadable module Jeff Lee
  2002-08-20 11:11 ` Matthew Wilcox
  2002-08-20 11:22 ` Richard Hirst
@ 2002-08-20 11:41 ` Jeff Lee
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff Lee @ 2002-08-20 11:41 UTC (permalink / raw)
  To: linux-ia64

TXkga2VybmVsIHdhcyBmcm9tIHRoZSBSSCBpbnN0YWxsYXRpb24gQ0QuICBJIGhhdmVuJ3QgdG91
Y2hlZCBpdCB5ZXQuDQoNCkkgdXNlZCBnY2MzLjEgZm9yIGEgcmVhc29uOiB0aGUgMi45NiBnY2Mg
Y2F1c2VzIHRoZSBzYW1lIHByb2JsZW07IGhlbmNlIEkgdHJpZWQgZ2NjMy4xIGJ1dCB0aGF0IGRv
ZXNuJ3Qgc2VlbSB0byBtYXR0ZXIsDQoNCkFjdHVhbGx5LCBJIHRyaWVkIGEgbGl0dGxlIGV4cGVy
aW1lbnQuICBJIHByaW50ZWQgdGhlIGFkZHJlc3Mgb2YgZHVtbXkoKSBvdXQ7ICBzdXJwcmlzaW5n
bHksIHRoZSByZWFkaW5nIG9mIGR1bW15KCkgaXMgZGlmZmVyZW50IGluIHRoZSBleHBvcnRpbmcg
bW9kdWxlIGZyb20gdGhlIGNhbGxpbmcgbW9kdWxlIChubyB3b25kZXIgdGhlIGtlcm5lbCBzdGFj
a3MpLiAgQnV0LCBhbnkgb3RoZXIgZ2xvYmFsIHZhcmlhYmxlcyBsb29rIGZpbmUuICANCg0KV2hh
dCBzbyBzcGVjaWFsIGFib3V0IHRoZSBrZXJuZWwg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wcm90b3R5cGVzICAtRF9faWE2NF9fIC1EX0xQNjQNCj4gLWZmaXhlZC1yMTMg
LW1maXhlZC1yYW5nZT1mMTAtZjE1LGYzMi1mMTI3IC1mYWxpZ24tZnVuY3Rpb25zPTMyDQo+IC1m
bm8tY29tbW9uIC1Xbm8tdW51c2VkIC1tYi1zdGVwIC1JIC1JL3Vzci9zcmMvbGludXgtMi40L2Ry
aXZlcnMvc2NzaSAtSQ0KPiAtSS9zY3NpICAtSS91c3Ivc3JjL2xpbnV4LTIuNC9kcml2ZXJzL3Nj
c2kgLURNT0RVTEUgLURNT0RWRVJTSU9OUyAtaW5jbHVkZQ0KPiAvdXNyL3NyYy9saW51eC0yLjQv
aW5jbHVkZS9saW51eC9tb2R2ZXJzaW9ucy5oLURfX0tFUk5FTF9fICBteWhlbGxvMS5jDQoNCi4u
IGFuZCB5b3UncmUgdXNpbmcgZ2NjIDMuMSwgc28gbWF5YmUgdGhpcyBjb21waWxlciBtaXNtYXRj
aCBpcyBjYXVzaW5nDQp0aGUgcHJvYmxlbT8NCg0KLS0NClJldm9sdXRpb25zIGRvIG5vdCByZXF1
aXJlIGNvcnBvcmF0ZSBzdXBwb3J0LiANCg=



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-20 11:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-20  9:52 [Linux-ia64] Kernel dumps stacks while calling exported function from a loadable module Jeff Lee
2002-08-20 11:11 ` Matthew Wilcox
2002-08-20 11:22 ` Richard Hirst
2002-08-20 11:41 ` Jeff Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox