Bug#494144: Checking versions of the symbols in modules
Package: linux-image-2.6.26-1-686
Version: 2.6.26-1-686
Severity: normal
Hello,
I have a problem with kernel version 2.6.26, that I consider that could be a
bug.
summary:
In a kernel already compiled, we install new modules, some of that depend of
the others.
after starting that kernel, the module who has the dependencies can not find
the symbols that uses from the first module, and does not load.
Full description:
In a kernel already compiled, we install new modules, some of them depending
from the others.
In this case the modules are lzma and squashfs-lzma
after loading the module lzma we verify in /proc/kallsyms that the symbols
have been exported and correctly noted.
When we try to load the module squashfs that depends on the symbols of sqlzma,
the kernel responds:
no symbol version for sqlzma_init
Unknown symbol sqlzma_init
no symbol version for sqlzma_un
Unknown symbol sqlzma_un
no symbol version for sqlzma_fin
Unknown symbol sqlzma_fin
workaround:
my first solution was to compile a kernel with MODULE_FORCE_LOADING enabled,
and forcing modprobe to do that. That works,
in this case is a recompilation to enable MODULE_FORCE_LOADING.
Linux version 2.6.26.1-686-jp2 (root@pcjordi) (gcc version 4.3.1 (Debian
4.3.1-2) ) #1 SMP PREEMPT Tue Aug 5 11:34:33 CEST 2008
a good solution is done modifying the kernel source,
inspecting the source "module.c", can be appreciated differences with the
version 2.6.25 in the routine "check_version", so that previously has
returned "1=OK" when the version for a symbol was not found, but in this
routine, version 2.6.26 returns "0=error".
Works well after modifying some lines of module.c
Attached is proposed a patch to module.c
P.D. lzma is from the sid repository of Debian, and squashfs-lzma is my own
development, based in previous versions of squashfs with lzma support,
Thanks,
Jordi Pujol
--- linux-2.6.26.1-old/kernel/module.c 2008-08-02 00:58:24.000000000 +0200
+++ linux-2.6.26.1/kernel/module.c 2008-08-05 14:48:13.000000000 +0200
@@ -936,9 +936,11 @@
goto bad_version;
}
+ /* Not in module's version table. OK, but that taints the kernel. */
printk(KERN_WARNING "%s: no symbol version for %s\n",
mod->name, symname);
- return 0;
+ add_taint_module(mod, TAINT_FORCED_MODULE);
+ return 1;
bad_version:
printk("%s: disagrees about version of symbol %s\n",
Reply to: