Date: Tue, 02 Feb 1999 23:19:52 -0800 From: Mike Smith <mike@smith.net.au> To: Julian Elischer <julian@whistle.com> Cc: current@FreeBSD.ORG Subject: Re: KLD confusion.. Message-ID: <199902030719.XAA00601@dingo.cdrom.com> In-Reply-To: Your message of "Mon, 01 Feb 1999 17:04:53 PST." <36B64F35.237C228A@whistle.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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 is handleable by just not loading 'A' > but what about the following: > > kldload 'B' where B is defined to have a dependency on 'A' > and 'A' is already loaded.. > > A get's loaded again.. leading to REALLY strange behaviour > if the kernel is talking to one copy of A and B is talking > to the other. That's definitely not correct behaviour, but again it's because the dependancy is implemented as a NEEDED reference to a *file*, not a module. > I've had a look at the code, but > I think this would be a 20 minute thing for the right person, > rather than a 2 day thing for me... It's been about 2 months for me so far, so I guess either I'm not the right person, or it's not that easy. I can't see a "right" way of fixing it short of completely separating "files" and "modules". Here's another scenario guaranteed to flummox the current code; link A and B together in a single file, name it after A. Then have C, which depends on B, and try to load that. It's going to look for a file named after B... -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.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?199902030719.XAA00601>