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/
- Follow-Ups:
- References:
- [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- From: Ashutosh Naik <[email protected]>
- Re: [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- From: Rusty Russell <[email protected]>
- Re: [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- From: Ashutosh Naik <[email protected]>
- Re: [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- From: Jesper Juhl <[email protected]>
- Re: [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- From: Rusty Russell <[email protected]>
- Re: [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- From: Ashutosh Naik <[email protected]>
- Re: [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- From: Ashutosh Naik <[email protected]>
- Re: [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- From: Andrew Morton <[email protected]>
- [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- Prev by Date: Re: [BUG] Xserver startup locks system... git bisect results
- Next by Date: Re: [BUG] Xserver startup locks system... git bisect results
- Previous by thread: Re: [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- Next by thread: Re: [RFC][PATCH] Prevent overriding of Symbols in the Kernel, avoiding Undefined behaviour
- Index(es):