From: Mike Frysinger <vapier.adi@gmail.com>
To: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: module version magic and arches with symbol prefixes
Date: Fri, 19 Jun 2009 09:14:00 -0400 [thread overview]
Message-ID: <8bd0f97a0906190614x2ed27fcdrb59ea339eb45ba82@mail.gmail.com> (raw)
In-Reply-To: <200906190854.13052.rgetz@blackfin.uclinux.org>
On Fri, Jun 19, 2009 at 08:54, Robin Getz wrote:
> On Fri 19 Jun 2009 01:38, Rusty Russell pondered:
>> On Fri, 19 Jun 2009 12:54:44 am Mike Frysinger wrote:
>> > the current check_modstruct_version() does this:
>> > {
>> > const unsigned long *crc;
>> >
>> > if (!find_symbol("module_layout", NULL, &crc, true, false))
>> > BUG();
>> > return check_version(sechdrs, versindex, "module_layout", mod, crc);
>> > }
>> > the trouble here is that it looks for a literal "module_layout" symbol
>> > and for ports that have symbol prefixes (a quick check shows Blackfin
>> > & h8300), this aint going to work.
>>
>> MODULE_SYMBOL_PREFIX is the fix for this, ie:
>>
>> if (!find_symbol(MODULE_SYMBOL_PREFIX "module_layout), ...
>>
>> > also, using BUG() here seems pretty damn harsh. wouldnt it make more
>> > sense to do something like:
>> > if (WARN_ON(!find_symbol("module_layout", NULL, &crc, true, false)))
>> > return 0;
>> > this way the module is simply not loaded rather than killing the kernel
>>
>> No, it means the kernel didn't build properly.
>
> Or a module didn't build properly.
nah, when i talked to you earlier i was wrong -- this find_symbol() is
looking up the symbol in the kernel, not in the module. the lookup of
the symbol in the requested module actually works.
-mike
next prev parent reply other threads:[~2009-06-19 13:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-18 15:24 module version magic and arches with symbol prefixes Mike Frysinger
2009-06-19 5:38 ` Rusty Russell
2009-06-19 7:49 ` [PATCH] module: use MODULE_SYMBOL_PREFIX with module_layout Mike Frysinger
2009-06-19 14:02 ` Rusty Russell
2009-06-19 18:29 ` Mike Frysinger
2009-06-19 12:54 ` module version magic and arches with symbol prefixes Robin Getz
2009-06-19 13:14 ` Mike Frysinger [this message]
2009-06-19 17:07 ` Robin Getz
2009-06-19 18:32 ` Mike Frysinger
2009-06-23 7:07 ` Rusty Russell
2009-06-29 12:07 ` Robin Getz
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=8bd0f97a0906190614x2ed27fcdrb59ea339eb45ba82@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rgetz@blackfin.uclinux.org \
--cc=rusty@rustcorp.com.au \
/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