On Fri, 1 Jun 2001, David Douthitt wrote:

> [EMAIL PROTECTED] wrote:
> 
> > Be aware that kernels go with the set of modules compiled with
> > them.  There are exceptions to this rule, but the safest bet is to make
> > sure the kernel and modules you use came together.
> 
> I always suspected there were exceptions to the rule; can you quantify
> what they are and what ties a module explicitly to one kernel or
> another?  Is it the kernel symbols and support for different things in
> different kernels or what?

The kernel is just a program, and a module is just a unit of code in that
program.  Program units typically use APIs (sets of global data values and
function entry points) to avoid duplicating effort, and may provide them
to other program units as well.  These APIs have associated symbols and
semantics (rules for use and expected behavior when used according to
those rules).  An extreme example of semantic variation is the userland
ioctl function... which is the kitchen sink (garbage dispose-all?) of the
Unix device driver model.

Aside from module version number checking (CONFIG_MODVERSIONS), the real
determinant of whether a module will work for different kernel images is
whether the APIs associated with that module have changed.  Some APIs are
used by practically every module, while others are very specific.  APIs
can be omitted merely by changing kernel configuration options, but if a
particular module doesn't use that API then it won't be affected.  Thus,
in cases where a kernel module uses a minimum of APIs it may be usable in
a wide range of kernel images, whereas if a lot of development (change) is
occuring on an API between kernel versions then the module may be very
fussy about which image it will work with.

I think there was an API change in how modules export symbols between 2.0
and 2.2, so only a very few modules (that don't export symbols and don't
use APIs) will work between those kernel versions.  Irqtune is one that
would probably work this way.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[EMAIL PROTECTED]>        Basics: ##.#.       ##.#.  Live Go...
Work:<[EMAIL PROTECTED]>              Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------



_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to