Re: [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2005-12-14 at 20:40 -0800, Andrew Morton wrote:
> Ashutosh Naik <[email protected]> wrote:
> >
> > This patch ensures that an exported symbol  does not already exist in
> >  the kernel or in some other module's exported symbol table. This is
> >  done by checking the symbol tables for the exported symbol at the time
> >  of loading the module. Currently this is done after the relocation of
> >  the symbol.
> 
> This patch causes weird things to happen on ppc64.

And probably in general:

+       for (i = 0; i < mod->num_syms; i++)
+               if (!__find_symbol(mod->syms[i].name, &owner, &crc, 1)) {
+                       name = mod->syms[i].name;
+                       ret = -ENOEXEC;
+                       goto dup;

__find_symbol returns the value, or 0 on failure.  This test is
backwards, as is the one below it.

Rusty.
-- 
 ccontrol: http://ozlabs.org/~rusty/ccontrol

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux