Skip to contentSkip to conversation

missing symbol do_softirq in net moduels for pre-2

DISCUSSION Ed Tomlinson 4 participants 9 messages Jun 9, 2001

lore
Share & tools
lore
#0 lore raw

Hi,

Built -pre2 and noticed most of the modules in net/* are getting a missing symbol for do_softirq.

Have I messed up, or is there a real error?

Ed Tomlinson <[email protected]>

#2 lore raw
Quoted 6 lines · Keith Owens
Quoted 2 lines · On Sat, 9 Jun 2001 Ed Tomlinson <[email protected]> wrote:

Built -pre2 and noticed most of the modules in net/* are getting a missing symbol for do_softirq.

http://www.tux.org/lkml/#s8-8

Hmm, I don't think this is it--I'm seeing the same thing, and I have tried 'make mrproper'. All symbols are getting versionated except certain calls to do_softirq() in, e.g., sunrpc.o and the iptables modules.

I looked into this, and I believe the problem is due to 2.4.6-pre2's change to the i386 local_bh_enable() macro--the C version has been replaced with an assembly language version that does "call do_doftirq;". Perhaps this function call from the assembly language version does not get versionated?

Cheers, Wayne

#3 lore raw
In reply to Ed Tomlinson

Keith Owens:

Quoted 3 lines
Quoted 2 lines

Built -pre2 and noticed most of the modules in net/* are getting a missing symbol for do_softirq.

http://www.tux.org/lkml/#s8-8

I got the same error on -pre1, and tried the info in the link, didn't help:

root@test4:/usr/src# depmod -ae
depmod: *** Unresolved symbols in /lib/modules/2.4.6-pre1/kernel/net/ipv4/netfilter/ip_tables.o
depmod:         do_softirq
depmod: *** Unresolved symbols in /lib/modules/2.4.6-pre1/kernel/net/ipv4/netfilter/ipt_LOG.o
depmod:         do_softirq

Am I missing something in my .config, or is there something else that's wrong? Any clues to where I should look?

Signature · 1 line
-Thomas
#4 lore raw
Quoted 10 lines · On Sat, 9 Jun 2001 18:56:24 +0200, =?iso-8859-1?Q?Thomas_Lang=E5s?=…

Keith Owens:

Quoted 3 lines
Quoted 2 lines

Built -pre2 and noticed most of the modules in net/* are getting a missing symbol for do_softirq.

http://www.tux.org/lkml/#s8-8

I got the same error on -pre1, and tried the info in the link, didn't help:

root@test4:/usr/src# depmod -ae
depmod: *** Unresolved symbols in /lib/modules/2.4.6-pre1/kernel/net/ipv4/netfilter/ip_tables.o
depmod:         do_softirq

It was missing in 6-pre1. It should have been fixed in 6-pre2.

#5 lore raw
Quoted 12 lines · Keith Owens

On Sat, 9 Jun 2001 18:56:24 +0200,

Quoted 9 lines · =?iso-8859-1?Q?Thomas_Lang=E5s?= <[email protected]> wrote:

Keith Owens:

Quoted 4 lines
Quoted 2 lines

Built -pre2 and noticed most of the modules in net/* are getting a missing symbol for do_softirq.

http://www.tux.org/lkml/#s8-8

I got the same error on -pre1, and tried the info in the link, didn't help:

Quoted 6 lines
Quoted 4 lines
root@test4:/usr/src# depmod -ae
depmod: *** Unresolved symbols in
/lib/modules/2.4.6-pre1/kernel/net/ipv4/netfilter/ip_tables.o depmod:    
    do_softirq

It was missing in 6-pre1. It should have been fixed in 6-pre2.

The fix to export ksyms for do_softirq is _in_ pre2... its just not working.

from ksyms in pre2:
/* software interrupts */
EXPORT_SYMBOL(tasklet_hi_vec);
EXPORT_SYMBOL(tasklet_vec);
EXPORT_SYMBOL(bh_task_vec);
EXPORT_SYMBOL(init_bh);
EXPORT_SYMBOL(remove_bh);
EXPORT_SYMBOL(tasklet_init);
EXPORT_SYMBOL(tasklet_kill);
EXPORT_SYMBOL(__run_task_queue);
EXPORT_SYMBOL(do_softirq);
EXPORT_SYMBOL(tasklet_schedule);
EXPORT_SYMBOL(tasklet_hi_schedule);

in the arch code for softirq we now have:

+#define local_bh_enable()                                              \
+do {                                                                   \
+       unsigned int *ptr = &local_bh_count(smp_processor_id());        \
+                                                                       \
+       if (!--*ptr)                                                    \
+               __asm__ __volatile__ (                                  \
+                       "cmpl $0, -8(%0);"                              \
+                       "jnz 2f;"                                       \
+                       "1:;"                                           \
+                                                                       \
+                       ".section .text.lock,\"ax\";"                   \
+                       "2: pushl %%eax; pushl %%ecx; pushl %%edx;"     \

+ "call do_softirq;"

What has to happen to get assembly code to version the symbol?

Ed Tomlinson

#6 lore raw
Quoted 16 lines · Ed Tomlinson

in the arch code for softirq we now have:

(quoted diff) +13 -0
+#define local_bh_enable()                                              \
+do {                                                                   \
+       unsigned int *ptr = &local_bh_count(smp_processor_id());        \
+                                                                       \
+       if (!--*ptr)                                                    \
+               __asm__ __volatile__ (                                  \
+                       "cmpl $0, -8(%0);"                              \
+                       "jnz 2f;"                                       \
+                       "1:;"                                           \
+                                                                       \
+                       ".section .text.lock,\"ax\";"                   \
+                       "2: pushl %%eax; pushl %%ecx; pushl %%edx;"     \
+                       "call do_softirq;"
Quoted 1 line

What has to happen to get assembly code to version the symbol?

I have verified that the versioning of the do_softirq symbol above is the source of the problems in 2.4.6-pre2: I made two copies of the local_bh_enable macro, one with the versioning hash explicitly appended to the symbol, and chose between with #ifdef MODULE. Everything works fine now.

Of course, this is ugly, ugly, ugly, so hopefully someone will answer Ed's question as to the correct way of doing this.

Cheers, Wayne

#7 lore raw
Quoted 2 lines · Wayne Whitney

I have verified that the versioning of the do_softirq symbol above is the source of the problems in 2.4.6-pre2

Resend, the first patch never appeared. The problem is the call to do_softirq inside an asm string where cpp cannot convert it. The correct fix is toe xpose do_softirq so cpp can convert it then map to a string and concatenate with teh asm string. But that requires ugly helper macros, a cleaner fix is:

Against 2.4.6-pre2. Note: you must run make mrproper after applying this patch.

Index: 6-pre2.1/kernel/ksyms.c

kernel/ksyms.c Sun, 10 Jun 2001 03:36:12 +1000 kaos (linux-2.4/j/46_ksyms.c 1.1.2.2.1.1.2.1.1.8.2.1.2.1 644) renamed from kernel/ksyms.c Sat, 09 Jun 2001 11:25:53 +1000 kaos (linux-2.4/j/46_ksyms.c 1.1.2.2.1.1.2.1.1.8.2.1.2.1 644) +1 -1
@@ -536,7 +536,7 @@ EXPORT_SYMBOL(remove_bh);
 EXPORT_SYMBOL(tasklet_init);
 EXPORT_SYMBOL(tasklet_kill);
 EXPORT_SYMBOL(__run_task_queue);
-EXPORT_SYMBOL(do_softirq);
+EXPORT_SYMBOL_NOVERS(do_softirq);
 EXPORT_SYMBOL(tasklet_schedule);
 EXPORT_SYMBOL(tasklet_hi_schedule);
 
#8 lore raw
In reply to Ed Tomlinson
Quoted 12 lines · Wayne Whitney
Quoted 5 lines · Keith Owens
Quoted 2 lines · On Sat, 9 Jun 2001 Ed Tomlinson <[email protected]> wrote:

Built -pre2 and noticed most of the modules in net/* are getting a missing symbol for do_softirq.

http://www.tux.org/lkml/#s8-8

Hmm, I don't think this is it--I'm seeing the same thing, and I have tried 'make mrproper'. All symbols are getting versionated except certain calls to do_softirq() in, e.g., sunrpc.o and the iptables modules.

Quoted 5 lines

I looked into this, and I believe the problem is due to 2.4.6-pre2's change to the i386 local_bh_enable() macro--the C version has been replaced with an assembly language version that does "call do_doftirq;". Perhaps this function call from the assembly language version does not get versionated?

In my case its off a clean tree patched with lvm, ide patches, dma timeout retry patch and reiserfs fixes. Did we not have a problem a while back in ac with versioned symbols in assembly?

Ed Tomlinson