Files
linux/scripts/mod
Krzysztof Halasa bf1fe0bc49 kbuild: Fix modpost segfault
commit 1c938663d5 upstream.

Alan <alan@clueserver.org> writes:

> program: /home/alan/GitTrees/linux-2.6-mid-ref/scripts/mod/modpost -o
> Module.symvers -S vmlinux.o
>
> Program received signal SIGSEGV, Segmentation fault.

It just hit me.
It's the offset calculation in reloc_location() which overflows:
        return (void *)elf->hdr + sechdrs[section].sh_offset +
               (r->r_offset - sechdrs[section].sh_addr);

E.g. for the first rodata r entry:
r->r_offset < sechdrs[section].sh_addr
and the expression in the parenthesis produces 0xFFFFFFE0 or something
equally wise.

Reported-by: Alan <alan@clueserver.org>
Signed-off-by: Krzysztof HaƂasa <khc@pm.waw.pl>
Tested-by: Alan <alan@clueserver.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 10:21:29 -07:00
..
2005-10-18 08:26:15 -07:00
2005-04-16 15:20:36 -07:00
2009-09-23 07:39:43 -07:00
2005-04-16 15:20:36 -07:00
2008-07-24 10:47:24 -07:00
2010-08-02 10:21:29 -07:00