Don't understand german? Read or subscribe to my english-only feed.

Kernel Debugging: Unknown symbol

While preparing and testing the Linux kernel 2.6.9 for the grml-system I noticed problems with loading the reiser4-module:

# modprobe reiser4
FATAL: Error inserting reiser4 (/lib/modules/2.6.9-grml/kernel/fs/reiser4/reiser4.ko):
Unknown symbol in module, or unknown parameter (see dmesg)
# dmesg | tail -1
reiser4: Unknown symbol find_get_pages_tag

Google does not know the problem (yet ;-)) and taking a closer look at the reiser4-patch shows that the problem seems to be located in merging together all the patches I applied for the grml-kernel. But I’m still interested in getting a working module so I tried to fix the problem on my own (being not a kernelhacker).

First of all let’s see whether System.map knows something about find_get_pages_tag:

$ strings /boot/System.map-2.6.9-grml| grep find_get_pages_tag 
c013a994 T find_get_pages_tag

Ok, now we check out where find_get_pages_tag should be defined:

/path/to/kernelsource $ grep -rH 'find_get_pages_tag(' .

Now let’s take a look at the file where the function is defined (in this case mm/filemap.c):

unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index,                                       
»·······»·······»·······int tag, unsigned int nr_pages, struct page **pages)
{
[...]
}

Ok, it seems that there’s missing an EXPORT_SYMBOL, so let’s add it:

EXPORT_SYMBOL(find_get_pages_tag);

Recompile the kernel and now let’s try to load the module again:

# modprobe reiser4
# lsmod | grep reiser
reiser4               392180  0
#

Works! :-)

2 Responses to “Kernel Debugging: Unknown symbol”

  1. James Says:

    Hey thanks bud. I was just playing around trying to compile the latest 2.6.10-cko1 kernel patch I found somewhere because 2.6.10-ck1-nitro1 doesn’t work well for me.

    Just converted my Suse 9.2 to reiser4 but was having lockups with other patch-sets so I hope this does the trick.

  2. GS HUnt Says:

    Trying it right now… in 2.6.10 nitro-4

    THanks for the info

    Gary