Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Feb 1999 12:29:34 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        mike@smith.net.au (Mike Smith)
Cc:        julian@whistle.com, current@FreeBSD.ORG
Subject:   Re: KLD confusion..
Message-ID:  <199902032029.MAA25871@bubba.whistle.com>
In-Reply-To: <199902030719.XAA00601@dingo.cdrom.com> from Mike Smith at "Feb 2, 99 11:19:52 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Mike Smith writes:
> > Take the following scenario:
> > 
> > compiled in: module A
> > 
> > kldstat -v shows module 'A'
> > 
> > kldload A
> >  damned thing succeeds.
> 
> That's correct.  There's a fundamental problem here in that there's a 
> confusion between file names and module names.  This is a basic flaw in 
> the way that KLD was implemented (no offense to Doug; it was initially 
> meant to be a better LKM, not necessarily a whole new ball of wax).
> 
> I've taken about four different runs at a "right" way of doing this 
> subsequently.  I think that, with some help and advice from Doug and 
> Peter, I'm on the right track now, but there's no hope of it being 
> ready for 3.1.

This may be oversimplifying, but why wouldn't this work: just do
everything at the module level:

 - All dependencies are inter-*module* dependencies.
 - Only one *module* with the same name can be loaded at one time.
 - KLD files (eg, foo.ko) are simply containers for one or more modules.

We'd take the conservative stance on loading:  if you tried to
kldload foo.ko, it would fail unless *all* the modules in it were
successfully able to link & load.

It seems if you just make consistent what the atomic unit of linking
is (is it a file?? it is a module??) then all will be well. We just
have to make sure we have unique names for all modules as we do now
for files.

Now, there remains the problem of how do you find the file foo.ko
containing module "bar", eg, if you want to auto-load dependencies?
For starters, we could just assert that only module "foo" can be
found this way.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902032029.MAA25871>