Subject: README: LKM versioning
To: None <tech-kern@netbsd.org>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: tech-kern
Date: 09/06/2003 22:18:22
I've finished and committed the LKM versioning change. Just to sum
up: kernel now checks the kernel version of loaded LKM and several
compile options (DEBUG, DIAGNOSTIC, LOCKDEBUG, MULTIPROCESSOR at
the moment), to make sure the kernel and LKM use consistent
structures. Incompatible LKMs are refused and not loaded.
This check can be skipped using -f option to modload (not recommended).

Compared to last posted patch, following differs in the final version:

- uses strings to identify kernel compile options, rather than
  bit positions (suggested by Bill)
- the versions are embedded into module context (lkm_foo structure,
  as created by MOD_*() macro), and is checked inside lkmdispatch();
  this avoids having to export lkm_checkver() and makes it easier
  to possibly change/extend the checks in future

If you encounter any problem, please send-pr it ASAP.

Thanks,

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the tantric    -=-
-=- Buddhist masters say, ``You may notice during meditation that you -=-
-=- sometimes levitate or glow.   Do not let this distract you.''     -=-