Re: Why does insmod _not_ check for symbol redefinition ??
From: Rusty Russell
Date: Wed Nov 30 2005 - 20:00:09 EST
On Fri, 2005-11-25 at 10:45 +0530, Nagendra Singh Tomar wrote:
> Did'nt get any response to this one, so sending it again.
>
> Can any of the module subsystem authors tell, why they have decided to
> allow loading a kernel module having an EXPORTed symbol with the same name
> as an EXPORTed symbol in kernel proper. The safest thing would be to
> disallow module loading in this case, giving a "Symbol redefinition"
> error.
> Allowing the module load will lead to overriding kernel functions
> which will affect modules loaded in future, that reference those
> functions. Overall, it can have bad effects of varying severity.
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.
Hope that clarifies,
Rusty.
--
A bad analogy is like a leaky screwdriver -- Richard Braakman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/