From: Jordi Pujol <jordipujolp@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Checking versions of the symbols in modules
Date: Tue, 5 Aug 2008 16:24:52 +0200 [thread overview]
Message-ID: <200808051624.52983.jordipujolp@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]
Hello,
summary:
In a kernel already compiled, we install new modules, some of that depend of
the others. after charging the first module the next one can not find the
symbols that uses from the first.
Kernel version:
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
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 charging the module lzma we verify in /proc/kallsyms that the symbols
have been exported and correctly noted.
When we charge 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
Keywords:
modules, symbols
workaround:
my first solution was to compile a kernel with MODULE_FORCE_LOADING enabled,
and forcing modprobe to do that. That works,
the solution,
inspecting the module.c source,
can be appreciated differences with the version 2.6.25 in the routine
check_version, so that previously has returned correct when the version for a
symbol was not found, but in this routine, version 2.6.26 returns error.
Works well after modifying some lines of module.c
Attached is the patch to module.c
P.D. if the source of that modules is needed, lzma is from the sid repository
of Debian, and squashfs-lzma is my own develop, I can provide the Debian
package for it,
Thanks for that good kernel,
Jordi Pujol
[-- Attachment #2: linux-2.6.26-kernel-module.c.diff --]
[-- Type: text/x-diff, Size: 493 bytes --]
--- 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 other threads:[~2008-08-05 14:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200808051624.52983.jordipujolp@gmail.com \
--to=jordipujolp@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®