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

vmlinux .got size > 64k and Oops



Hi again,
in my quest to stop my module from generating Oops whenever I touch a bad user
pointer using copy_from_user() I think I have found the root cause. The problem
stems from the values in the kernel __ex_table section not matching up with the
instructions that they are supposed to protect. I think this is caused by the
linker getting confused when the .got table exceeds 64k bytes. Looking at a
stock RH6.1 kernel we see;

objdump -h /boot/vmlinux-2.2.13-0.9

Idx Name          Size      VMA               LMA               File off  Algn
11 .got          00011190  fffffc00005737e8  fffffc00005737e8  002737e8  2**3

0x11190 = 70032

So running a simple program like;

main()
{
        poll( 0, 10, 10);
}

Generates;

 <1>Unable to handle kernel paging request at virtual address 0000000000000000
a.out(636): Oops 0
pc = [<fffffc00004a7be0>]  ra = [<fffffc000035975c>]  ps = 0000


So apart from putting the kernel on a big diet is there anyway to fix this e.g.
is the linker (ld) broken ?

Cheers,
Addy.






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