Re: Compiling a module for different kernel versions

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

 



* Mike Voytovich (mikev@digeo.com) wrote:
> 
> CONFIG_MODVERSIONS (Set version information on all module symbols) was
> meant to allow you to use the same module with different kernel
> versions, as long as the kernel interfaces used by the module were the
> same.
> 
> Is is suggested to not use this anymore or something?

MODVERSIONS is broken in many ways.  Consider the case where a
core structure (say task_struct) has changed.  The module may load,
but structure offsets now have different meanings.  Also, even with
MODVERSIONS you can't load a module compiled for SMP to a UP kernel,
you'll have missing symbols.  You can make it work, but if you aren't
really clear on what impliicit assumptions your module has about the
kernel, you are _much_ better off simply recompiling.

cheers,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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