From: Rusty Russell <rusty@rustcorp.com.au>
To: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com, jgarzik@pobox.com
Subject: Re: [PATCH] Module alias and device table support.
Date: Sat, 01 Feb 2003 14:49:57 +1100 [thread overview]
Message-ID: <20030201041428.28F682C08C@lists.samba.org> (raw)
In-Reply-To: Your message of "Fri, 31 Jan 2003 00:23:56 MDT." <Pine.LNX.4.44.0301302351550.15587-100000@chaos.physics.uiowa.edu>
In message <Pine.LNX.4.44.0301302351550.15587-100000@chaos.physics.uiowa.edu> y
ou write:
> On Fri, 31 Jan 2003, Rusty Russell wrote:
> > D: Introduces "MODULE_ALIAS" which modules can use to embed their own
> > D: aliases for modprobe to use. Also adds a "finishing" step to modules to
> > D: supplement their aliases based on MODULE_TABLE declarations, eg.
> > D: 'usb:v0506p4601dl*dh*dc*dsc*dp*ic*isc*ip*' for drivers/usb/net/pegasus.o
>
> Some comments:
> o First of all, we're basically moving depmod functionality into the
> kernel tree, which I regard as a good thing, since we have to deal
> with actual kernel structures here. (The obvious disadvantage is that
> this makes it much easier to change these kernel structures, which
> breaks compatibility with other (user space) tools who expect a certain
> format)
Yes, but people already expect to run depmod at boot, and I haven't
made depmod safe for cross compiling. It could be done, but is it
worth it? I don't know.
BTW, the reason for using the alias mechanism is that aliases are
useful in themselves: consider you write a "new_foo" driver, you can
do "MODULE_ALIAS("foo")" and so no userspace changes are neccessary.
module-init-tools 0.9.8 already supported this.
> o My nm (RH 7.2 or .3, GNU nm 2.11.90.0.8) doesn't support --print-size.
> That'll probably affect many users.
OK. Fortunately I have a new version of the table2alias program which
takes the elf object directly, anyway, which has the benifit of being
faster, too.
> o What about collecting the struct xxx_device_id definitions into some
> header which could be included from the userspace code extracting
> the info instead of duplicating it. Still not quite fool-proof, but
> better than duplicating the info.
Great minds think alike: this was what Greg said. I did this in the
updated patch.
> o I think it'd be a good time to consider naming these sections e.g.
> "__discard.modalias", the license one "__discard.license" and have
> the kernel module loader discard "__discard*", so that it doesn't
> need to be aware of all that special crap, nor waste space for it.
> (Well, it needs to know about the license, anyway, so that's not such
> a good example).
I prefer to keep special symbols out of section names, so we can do
nice tricks later with __start_. So __discard_modalias would be my
preference if we're going to change it.
> o I'm not totally happy with the integration into the build system yet,
> but it'll clash with the module versioning changes anyway ;)
Yeah, I thought you'd say that 8). I consider this to be after
modversions in the queue, and I don't want to overload you.
> The modversions patch introduces a postprocessing stage for modules, which
> currently will only be invoked with CONFIG_MODVERSIONS set. However, I'm
> considering to make that pass mandatory either way. It basically obtains
> the list of all modules from the earlier stage, so it doesn't recurse and
> can thus be very fast. I'm currently coding the actual versioning process
> in C, since the shell / sed / grep based solution's performance isn't
> exactly great. In doing that, I already notice unresolved symbols and warn
> about them, which I think is an improvement to the build process, missing
> EXPORT_SYMBOL()s tend to go unnoticed quite often otherwise.
Well, you get them as warnings from depmod, but more timely checks is
good.
> Doing this postprocessing unconditionally would allow to generate the
> alias tables at this point as well.
>
> And while we're at it, we could add another section which specifies which
> other modules this module depends on (a.k.a which symbols it uses), making
> depmod kinda obsolete.
We can already figure what symbols it uses in depmod: the original
modprobe did just that, but Adam Richter complained about speed with
1200 modules (sure, it's < 1 second for most people, but Debian on an
old 486 would suck hard).
But putting the dependent module names in a section... I must say I
rather like that. I'll have to mull it over though.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2003-02-01 4:05 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-31 0:09 [PATCH] Module alias and device table support Rusty Russell
2003-01-31 6:23 ` Kai Germaschewski
2003-01-31 9:41 ` Horst von Brand
2003-01-31 15:42 ` Ingo Oeser
2003-01-31 22:33 ` Roman Zippel
2003-02-01 0:48 ` Kai Germaschewski
2003-02-01 1:22 ` Roman Zippel
2003-02-01 2:59 ` Kai Germaschewski
2003-02-01 10:31 ` Roman Zippel
2003-02-01 3:49 ` Rusty Russell [this message]
2003-02-01 7:20 ` Kai Germaschewski
2003-02-01 23:02 ` Horst von Brand
2003-02-03 0:52 ` Rusty Russell
2003-02-03 2:49 ` John Levon
2003-02-03 10:34 ` Rusty Russell
2003-02-04 9:56 ` Horst von Brand
2003-02-05 0:00 ` Rusty Russell
2003-02-03 8:31 ` Horst von Brand
2003-02-03 10:52 ` Rusty Russell
2003-02-04 8:05 ` Horst von Brand
2003-02-04 8:51 ` Rusty Russell
2003-02-06 23:09 ` [PATCH] Restore module support Roman Zippel
2003-02-06 23:25 ` Greg KH
2003-02-07 0:01 ` Roman Zippel
2003-02-07 4:06 ` Greg KH
2003-02-07 9:39 ` Roman Zippel
2003-02-07 18:01 ` Roman Zippel
2003-02-07 0:10 ` Russell King
2003-02-07 4:53 ` Rusty Russell
2003-02-07 10:03 ` Russell King
2003-02-07 6:12 ` Kai Germaschewski
2003-02-07 9:46 ` Roman Zippel
2003-02-04 14:49 ` [PATCH] Module alias and device table support Roman Zippel
2003-02-03 13:40 ` Roman Zippel
[not found] <20030201073007$5418@gated-at.bofh.it>
[not found] ` <20030201073007$3e7f@gated-at.bofh.it>
2003-02-01 10:36 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2003-02-04 17:25 Adam J. Richter
2003-02-04 17:45 Adam J. Richter
2003-02-05 0:17 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030201041428.28F682C08C@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=greg@kroah.com \
--cc=jgarzik@pobox.com \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox