lkml.org 
[lkml]   [1996]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Module Versioning Problems
On Sun, 15 Sep 1996, Alan Cox wrote:

> We have a nasty module version bug at the moment as genksyms version ids
> for SMP and uniprocessor kernels match but the code doesnt work from
> one to the other (in fact getting it wrong can lose you things like
> file systems).
>
> [ ... ]
> Am I right in thinking I can do this... and if so would the modules folks
> care to confirm it and submit the change to Linus
>
> #ifdef __SMP__ /* SMP machine */
> /* Generate symbol_S0123456 */
> #define _set_ver(sym,vers) sym ## _S ## vers
> #else
> /* Generate symbol_R0123456 */
> #define _set_ver(sym,vers) sym ## _R ## vers
> #endif /* SMP */
>

Yes, I guess this would work though it needs to adapt the modules package.

However, it doesn't solve the problem for non-MODVERSION compilations.
For these we would need a variable in kernel (e.g. smp_num_cpus), which
is compiled in also in non-SMP kernel (currently it is #ifdef __SMP__).
The modules, if compiled under SMP should have a reference to this
variable (could be in <linux/module.h>) and insmod could take care of the rest.
This solution would solve both cases, with or without MODVERSION and the
changes in the modules package are minimal.

Hans
<lermen@fgan.de>


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.061 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site