lkml.org 
[lkml]   [2005]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Why does insmod _not_ check for symbol redefinition ??
2005/12/1, Nagendra Singh Tomar <nagendra_tomar@adaptec.com>:
> On Thu, 1 Dec 2005, Rusty Russell wrote:
>
> > Sure. It was due to minimalism. If you override a symbol it's
> > undefined behavior. It should be fairly simple to add a check that
> > noone overrides a symbol. We didn't bother checking for it because it
> > wasn't clear that it was problematic.
>
> Thanx.
> Of all the problems (including kernel crashes, BUGs etc) one of the
> more serious kinds are the ones where someone writes a new module and
> accidently defines a function which has the same name as one of functions
> (say foo_export), already EXPORTed by either kernel proper or some
> loaded module (as the kernel is growing bigger chances of this happening
> is also growing). The module happily loads and then some other module
> which wants to use the function foo_export (obviously the one EXPORTed by
> kernel proper and not the one overidden by the overiding module) is
> loaded. It will also load happily but will get linked against the new
> foo_export, defnitely not something that he wants. And, all this has
> happened without the kernel telling the user anything.
> IMHO, these kind of silent errors are very dangerous and not
> something that should be acceptable.
> As you rightly said, it should be fairly straightforward to check for
> symbol redefinition. We need to do it only for the symbols EXPORTed by the
> loadable module.

This shouldn't happen if you only use in-tree modules as you should.
Don't take kernel modules as user mode applications.
--
Coywolf Qi Hunt
http://sosdg.org/~coywolf/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-12-01 06:29    [W:0.034 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site