From: Rusty Russell <rusty@rustcorp.com.au>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org,
Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>,
perex@suse.cz, "Adam J. Richter" <adam@yggdrasil.com>
Subject: Re: [PATCH] Module alias and table support
Date: Tue, 26 Nov 2002 10:42:14 +1100 [thread overview]
Message-ID: <20021125234441.00C332C25F@lists.samba.org> (raw)
In-Reply-To: Your message of "Mon, 25 Nov 2002 13:36:17 -0800." <20021125213617.GA25269@kroah.com>
In message <20021125213617.GA25269@kroah.com> you write:
> On Mon, Nov 25, 2002 at 10:34:16AM +1100, Rusty Russell wrote:
> > > > + /* not matched against */
> > > > + kernel_long driver_info;
> > >
> > > Or is it because of "kernel_long"? I'm pretty sure this field is only
> > > used within the kernel, and userspace does not care at all about it.
> >
> > It sucks to reproduce this, yes. But you need to know the size of the
> > structure to grab it out of the object file. At least this way it's
> > in the kernel source where we can change it.
>
> But can't we still just use the structure from the kernel header and not
> have to retype it here? If needed, we can change the type of
> driver_info into something more portable than what it is today. That
> would be much easier in the long run.
Absolutely. But I didn't want to mess with your headers.
> > Which will simply match the alias such as:
> > usb:v0506p4601dl*dh*dc*dsc*dp*ic*isc*ip*
>
> Ah, you never told me about this plan :)
Oh, so I didn't explain the "clever" part of my clever plan? Oops.
> Yes, that would be very nice to have, pushing the logic out of the
> /sbin/hotplug code and into modprobe doesn't bother me. That just saved
> a _whole_ bunch of space in diethotplug, so you've made up for making
> the size smaller.
>
> How would modprobe know which driver to load based on the above line?
> Are you going to scan all module files, or rely on something like the
> modules.*map files of today?
0.7 scans all the files (since it has no modules.dep and needs the
dependencies anyway). 0.8 reintroduces modules.dep (thanks Adam!)
which is where the alias info logically belongs ("stuff extracted from
modules"). Or maybe a separate file (implementation handwave).
> Just realize that if you pre-process the information like you are
> proposing to do, you can't get it back later, which changes the way
> things work.
Well, you could, by sucking out the aliases which start with "usb:"
(the post-processing just turns the tables into aliases, doesn't
delete them or anything). You could also use the old-fashioned way
and suck it from the tables directly, but then you're back in
"intimate knowledge of kernel internals" land.
Cheers,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2002-11-25 23:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-14 1:19 [PATCH] Module alias and table support Rusty Russell
2002-11-20 8:23 ` Greg KH
2002-11-24 23:34 ` Rusty Russell
2002-11-25 21:36 ` Greg KH
2002-11-25 23:42 ` Rusty Russell [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-26 3:26 Adam J. Richter
2002-11-26 3:49 ` Greg KH
2002-11-26 4:52 Adam J. Richter
2002-11-27 6:25 David Brownell
2002-11-27 20:54 Adam J. Richter
2002-11-27 21:53 ` David Brownell
[not found] ` <20021127142006.A24246@adam.yggdrasil.com>
2002-11-27 22:59 ` David Brownell
2002-11-28 23:39 ` Rusty Russell
2002-11-28 3:14 ` Rusty Russell
2002-11-28 6:44 ` David Brownell
2002-11-28 22:01 ` David Brownell
2002-11-29 3:26 ` Rusty Russell
2002-11-29 19:56 ` Gerd Knorr
2002-11-29 1:28 ` Rusty Russell
2002-11-29 3:40 ` Greg KH
2002-11-28 0:22 Adam J. Richter
2002-11-28 1:48 ` David Brownell
2002-11-28 4:45 ` Keith Owens
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=20021125234441.00C332C25F@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=adam@yggdrasil.com \
--cc=greg@kroah.com \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@suse.cz \
/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