lkml.org 
[lkml]   [2009]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: module version magic and arches with symbol prefixes
Date
On Tue 23 Jun 2009 03:07, Rusty Russell pondered:
> On Sat, 20 Jun 2009 02:37:45 am Robin Getz wrote:
> > On Fri 19 Jun 2009 09:14, Mike Frysinger pondered:
> > > On Fri, Jun 19, 2009 at 08:54, Robin Getz wrote:
> > > > On Fri 19 Jun 2009 01:38, Rusty Russell pondered:
> > > >> 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.
> >
> > OK - Yeah, I see it now in the kernel proper. (sorry for the noise)
> >
> > Wouldn't it make sense to move this somewhere else then? and add a
> > __initcall() for it? We should only need to check for it once - it would
> > make things insignificantly faster, and smaller :)
>
> Patch welcome.

I looked at this:

> static inline int check_modstruct_version(Elf_Shdr *sechdrs,
> unsigned int versindex,
> struct module *mod)
> {
> const unsigned long *crc;
>
> if (!find_symbol(MODULE_SYMBOL_PREFIX "module_layout", NULL,
> &crc, true, false))
> BUG();
> return check_version(sechdrs, versindex, "module_layout", mod, crc); }

and then decided that since you need to call find_symbol() to populate
the crc, before it is used in check_version(), you might as well leave
alone (it wouldn't result in any smaller/faster code)...

So, I didn't send anything...


\
 
 \ /
  Last update: 2009-06-29 14:07    [W:0.102 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site