LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Install older kernel module into newer kernel - no symbol version for module (https://www.linuxquestions.org/questions/linux-kernel-70/install-older-kernel-module-into-newer-kernel-no-symbol-version-for-module-910131/)

bayoulinux 10-25-2011 04:29 PM

Install older kernel module into newer kernel - no symbol version for module
 
Hi:

Is a particular Linux kernel version backwards compatible with older
kernel modules?

I have build successfully a kernel module for two kernel versions
2.6.18 (CentOS 5.2) and 2.6.32 (CentOS6.0).

With kernel version 2.6.32 (CentOS6.0) running, I can successfully
insmod my 2.6.32 module into it. That's all well and good, life as
expected... However, with the same 2.6.32 kernel running, I cannot
seem to successfully insert into it my 2.6.18 (CentOS 5.2) built
module. When I try, I get the kernel error message: "no symbol version for module_layout".

Should I may able to (skipping the 'why would you do this' discussion... at least for the moment) take my kernel module built under 2.6.18 (CentOS 5.2) and insert it
successfully interl a running 2.6.32 (CentOS6.0) kernel?


Here's a little more info:

Centos6Machine# uname -r
2.6.32-71.el6.i686

Centos6Machine# modinfo mykernmod.ko
.
.
.
vermagic: 2.6.18-274.7.1.el5 SMP mod_unload 686 REGPARM 4KSTACKS
gcc-4.1

Thanks!

macemoneta 10-25-2011 05:02 PM

Quote:

Originally Posted by bayoulinux (Post 4508161)
Hi:

Is a particular Linux kernel version backwards compatible with older
kernel modules?

No, it is only compatible with the kernel it was built for.

sundialsvcs 10-25-2011 09:25 PM

:eek: Absolutely not!! :eek:

When a module is loaded, it literally becomes a part of the kernel, as though it had been loaded at boot time.

If the module was not built precisely for the exact kernel image that it has just been made a blood-brother part of ... your system will explode.

Anytime you make any change whatsoever to "the kernel," you must rebuild the entire kernel, "modules and all."

bsat 10-26-2011 12:26 AM

The only way you can insert the module in the 2.6.32 kernel is by rebuilding the module from source.

bayoulinux 10-26-2011 04:32 AM

Okay - its seem like "no" is the answer. ;-) I appreciate folks looking at the posting - thanks again.


All times are GMT -5. The time now is 02:03 PM.