Subject: Re: LKM versioning
To: Nathan J. Williams <nathanw@wasabisystems.com>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 04/07/2003 17:45:55
> What does the prior art look like?

1) Build the loadable modules as part of the kernel build.

2) Have an ABI that stops loadable modules looking at structures
   whose size might change.
   If they have to be accessed:
   a) use a function to allocate the structures
   b) keep the initial items at fixed offsets
   c) have a function/global that returns the offset of a sub-structure

3) Use restrcted name spaces to enforce the ABI

4) Have an overall ABI verson number so that old modules
   can be supported.  Useful if the structures needed to link in the
   loadable module change, or when compatibility functions can be used.
   (doesn't help if the loadable module accesses structures whose layout
   has been changed).

The main thing I've seen is that the layout of the structures that
loadable modules are allowed to access is strictly tied down.

	David

-- 
David Laight: david@l8s.co.uk