From owner-freebsd-current Wed Feb 3 12:32:06 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA17533 for freebsd-current-outgoing; Wed, 3 Feb 1999 12:30:48 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA17523 for ; Wed, 3 Feb 1999 12:30:46 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id MAA00912; Wed, 3 Feb 1999 12:29:55 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma000908; Wed, 3 Feb 99 12:29:34 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id MAA25871; Wed, 3 Feb 1999 12:29:34 -0800 (PST) From: Archie Cobbs Message-Id: <199902032029.MAA25871@bubba.whistle.com> Subject: Re: KLD confusion.. In-Reply-To: <199902030719.XAA00601@dingo.cdrom.com> from Mike Smith at "Feb 2, 99 11:19:52 pm" To: mike@smith.net.au (Mike Smith) Date: Wed, 3 Feb 1999 12:29:34 -0800 (PST) Cc: julian@whistle.com, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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