Re: Linux Kernal inconsistency?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <00c701c1694f$b448d750$3709a8c0@netbeastie.com> you wrote:

> Red Hat 7.2 is based on the 2.4.7 kernel.

It's based on 2.4.7-ac (the -ac patch is also on kernel.org). However due to
several security issues discovered after the release, the current 7.2 kernel
is 2.4.9-ac10 based.

> So I compiled my LKM for a 2.4.7
> kernel from kernel.org and thought that it would work on the same 2.4.7
> kernel found in Red Hat 7.2. I was wrong.

> When my LKM loads on the Red Hat 7.2 box using insmod -f mylkm.o I get an
> unresolved symbol up_and_exit.

That's because the Red Hat kernel has symbol versioning; you must compile
against the exact kernel version (eg the same value of CONFIG_SMP, the same
CPU settings etc etc). It will refuse to load modules that are compiled
against the wrong kernel version.

> Further, the 2.4.8 kernel from kernel.org still has up_and_exit() defined
> in kernel.h.

The Red Hat Linux kernel has it too, but check the symbol versioning...

> Is this a common practice of companies like Red Hat...?  I would think
> that if they built a 2.4.7-10 kernel that it would at least be
> function-level compatable with the approved 2.4.7 kernel found at
> kernel.org and certainly not take out kernel functions.

It _mostly_ is. The stable/exported interface of the kernel certainly is (eg
the system calls and the ioctls etc); however internal functions to the
kernel nobody guarantees... 

> Further, given the above, how would I/others deal with cases where 2.4.7
> has a function that is not found in RedHat's own 2.4.7-10 but is found in
> 2.4.8 and then goes away in 2.4.9 and above?

check for the existence of the function; no way around that. 

Greetings,
  Arjan van de Ven
  Red Hat Linux kernel maintainer
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux