From: Tim Gardner <tim.gardner@canonical.com>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linux-wireless@vger.kernel.org, Greg KH <greg@kroah.com>,
Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [RFC] compat-2.6: mangle symbols for driver-select
Date: Sun, 20 Sep 2009 10:49:02 -0600 [thread overview]
Message-ID: <4AB65CFE.7090101@canonical.com> (raw)
In-Reply-To: <43e72e890909200743h74934657nc056c9e6dcb14e90@mail.gmail.com>
Luis R. Rodriguez wrote:
> On Sat, Sep 19, 2009 at 8:46 PM, Tim Gardner <tim.gardner@canonical.com> wrote:
>> Luis R. Rodriguez wrote:
>>> Today at the summit we spoke about mangling symbols for driver-slect.
>>> Here's a quick nasty take on this but without doing this for driver-select
>>> specifically just for testing. It seems to compile, but someone more
>>> motivated
>>> may want to test and make this apply somehow only for driver-select or
>>> perhaps
>>> when a -D define is used.
>>>
>>> Reason for this is to help distributions / OEMs / ODMs who want to replace
>>> just *one* driver with compat-wireless.
>>>
>> I think it would be better to generate the list of mangled symbols
>> dynamically.
>
> Agreed, that is the part I left out, as a TODO to someone interested.
>
I'm working on a patch (it works with 2.6.31), but I need to test with
older kernels.
>> In older Ubuntu releases (before depmod behavior was
>> corrected), we have to run a 'munge' script to preface all of the exported
>> symbols so that a compat-wireless driver references the compat-wireless
>> protocol stack symbols. See the attached munge script for compat-wireless on
>> 2.6.24.
>
> Please correct me if I'm wrong but I believe the script seems to do
> what I did just that it actually edited the files with the changes, I
> prefer the way I did this as it requires less work to maintain and
> understand IMHO.
>
I'm fine with that, in fact its a bit faster since my munge script is a
bit slow. It'll also make dealing with kernel version dependent symbol
munge exceptions a bit simpler.
One thing that is worth mentioning is that the module names need to be
changed for older user space environments, otherwise depmod mucks things
up in interesting ways.
>> We can either do something like this for compat-wireless, or we
>> could use a subset of this logic to generate the list of symbols contained
>> within the '#ifdef CONFIG_COMPAT_WIRELESS_MANGLE' clause.
>
> So I was under the impression you would use this only if you are using
> ./scripts/driver-select to select one driver out of the whole tree,
> but it seems you actually use this for all the drivers on
> compat-wireless for the Ubuntu linux-backports-modules package. I take
> it you put lbm stuff then into some /lib/modules/$(uname)/compat/ and
> use a sort of /etc/depmod.d/01-compat.conf to prefer compat over
> updates/ or kernel/ ?
For LBM I've taken a scorched earth approach, i.e., _all_ drivers in
compat-wireless get built. The vast bulk of users that I deal with are
only interested in one driver, but I don't know a priori _which_ driver.
The use case where they would want to use a mainline driver at the same
time as a different compat-wireless driver is fairly rare (which my
approach makes impossible).
rtg
--
Tim Gardner tim.gardner@canonical.com
next prev parent reply other threads:[~2009-09-20 16:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-19 20:55 [RFC] compat-2.6: mangle symbols for driver-select Luis R. Rodriguez
2009-09-20 3:46 ` Tim Gardner
2009-09-20 14:43 ` Luis R. Rodriguez
2009-09-20 16:49 ` Tim Gardner [this message]
2009-09-20 17:28 ` Luis R. Rodriguez
2009-09-29 0:02 ` Andrey Yurovsky
2009-09-29 0:33 ` Luis R. Rodriguez
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=4AB65CFE.7090101@canonical.com \
--to=tim.gardner@canonical.com \
--cc=greg@kroah.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=lrodriguez@atheros.com \
/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;
as well as URLs for NNTP newsgroup(s).