In message: <[EMAIL PROTECTED]>
            Sean Kelly <[EMAIL PROTECTED]> writes:
: On Wed, Mar 05, 2003 at 09:59:01PM -0700, M. Warner Losh wrote:
: > Here's a simple patch.  However, it is a total suck-ass kludge (and
: > that's being generous).  The ABI isn't THE ABI, but rather a
: > collection of ABIs.  These ABIs change slowly and there is a certain
: > range that work together.  Historically, we've been really bad about
: > bumping version numbers when things change in modules.  Also, there's
: > no built-in versioning in the module names, which makes it harder to
: > have multiple versions around.  As such, the version numbers are set
: > to 1 and never change.
: 
: My kernel coding skills are severely limited, so please adjust any pointing
: and laughing as appropriate.
: 
: ...
: > +/*
: > + * Define the version.  Change the symbol name when things get too
: > + * incompatible.  version_5_1 means the 'ABI compatible with FreeBSD 5.1'
: > + */
: > +char __version_5_1 = 1;
: ...
: 
: Wouldn't it make more sense to have a symbol name that doesn't change
: across versions? Something like '_module_version' perhaps. Then the value
: of the symbol is the version which the module corresponds to. This would
: let you use something like kern.osreldate or a per-subsystem version index.

No.  We already have __FreeBSD_version that doesn't change.  This
symbol would ensure that the link would fail.  Link fails and then you
have to do nothing further to prevent the module from loading.

The other option would be to have all modules have an implicit
MODULE_DEPENDS on a freebsd moudle that's in the kernel.

: Another benefit(?) is that if _module_version is missing, you can decide
: that you don't care about versioning and just load the module. This could
: be useful for third-party modules that don't want to lock them down to a
: specific kernel/API/subsystem version. Not recommended, but optional.

No.  If you want versioining, you get strict versioning, imho.  I
don't want an opt-out.

Warner

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to