Re: [arm-gnu] Linux 2.6.30.9 crash with 2007q3-51 4.2.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] Linux 2.6.30.9 crash with 2007q3-51 4.2.1



Hi,


When i Build my kernel 2.6.30.9 with 4.2.0 and 4.2.2, it works well But when
i compile with 4.2.1 it crash in  int register_netdevice_notifier(struct
notifier_block *nb)  function.

I found that in 4.2.1 it generate wrong assembly.

With  version  4.2.0,

c001b904 <arp_init>:

c001b904:       e92d4010        push    {r4, lr}

c001b908:       e59f404c        ldr     r4, [pc, #76]   ; c001b95c
<arp_init+0x58>

c001b90c:       e24dd010        sub     sp, sp, #16     ; 0x10

c001b910:       e1a00004        mov     r0, r4

c001b914:       eb06fb88        bl      c01da73c <neigh_table_init>

c001b918:       e28400f8        add     r0, r4, #248    ; 0xf8

c001b91c:       eb06e2be        bl      c01d441c <dev_add_pack>

c001b920:       e2840e12        add     r0, r4, #288    ; 0x120

c001b924:       eb06ce1a        bl      c01cf194 <register_pernet_subsys>

c001b928:       e59fc030        ldr     ip, [pc, #48]   ; c001b960
<arp_init+0x5c>

c001b92c:       e3a0e000        mov     lr, #0  ; 0x0

c001b930:       e1a0000e        mov     r0, lr

c001b934:       e2841028        add     r1, r4, #40     ; 0x28

c001b938:       e3a02005        mov     r2, #5  ; 0x5

c001b93c:       e3a03011        mov     r3, #17 ; 0x11

c001b940:       e88d5000        stm     sp, {ip, lr}

c001b944:       e58de008        str     lr, [sp, #8]

c001b948:       eb06f2ee        bl      c01d8508 <neigh_sysctl_register>

c001b94c:       e2840e13        add     r0, r4, #304    ; 0x130

c001b950:       e28dd010        add     sp, sp, #16     ; 0x10

c001b954:       e8bd4010        pop     {r4, lr}

c001b958:       ea06e01c        b       c01d39d0
<register_netdevice_notifier>

c001b95c:       c0362a38        .word   0xc0362a38

c001b960:       c030f254        .word   0xc030f254



With  version  4.2.1,

c001b0c4 <arp_init>:

c001b0c4:       e92d401f        push    {r0, r1, r2, r3, r4, lr}

c001b0c8:       e59f4044        ldr     r4, [pc, #68]   ; c001b114
<arp_init+0x50>

c001b0cc:       e1a00004        mov     r0, r4

c001b0d0:       eb06eeb2        bl      c01d6ba0 <neigh_table_init>

c001b0d4:       e28400f8        add     r0, r4, #248    ; 0xf8

c001b0d8:       eb06d5b5        bl      c01d07b4 <dev_add_pack>

c001b0dc:       e2840e12        add     r0, r4, #288    ; 0x120

c001b0e0:       eb06c144        bl      c01cb5f8 <register_pernet_subsys>

c001b0e4:       e59fc02c        ldr     ip, [pc, #44]   ; c001b118
<arp_init+0x54>

c001b0e8:       e3a0e000        mov     lr, #0  ; 0x0

c001b0ec:       e1a0000e        mov     r0, lr

c001b0f0:       e2841028        add     r1, r4, #40     ; 0x28

c001b0f4:       e3a02005        mov     r2, #5  ; 0x5

c001b0f8:       e3a03011        mov     r3, #17 ; 0x11

c001b0fc:       e88d5000        stm     sp, {ip, lr}

c001b100:       e58de008        str     lr, [sp, #8]

c001b104:       eb06e623        bl      c01d4998 <neigh_sysctl_register>

c001b108:       e2840e13        add     r0, r4, #304    ; 0x130

c001b10c:       e8bd401f        pop     {r0, r1, r2, r3, r4, lr}

c001b110:       ea06d318        b       c01cfd78
<register_netdevice_notifier>

c001b114:       c035a540        .word   0xc035a540

c001b118:       c03078cf        .word   0xc03078cf



Parameter  in r0  gets  over-written  after  the    " pop     {r0, r1, r2,
r3, r4, lr}"   instruction execution.     This is  a  compiler  bug.



CC options   for compiling  the file  arp.o   are



arm-none-linux-gnueabi-gcc -Wp,-MD,net/ipv4/.arp.o.d  -nostdinc -isystem
/scratch/paul/lite/linux/install/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/include
-Iinclude  -I/data1/uma/t/linux-2.6.30.9/arch/arm/include -include
include/linux/autoconf.h -D__KERNEL__ -mlittle-endian
-Iarch/arm/mach-sdp/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
-fno-delete-null-pointer-checks -Os -marm -mabi=aapcs-linux
-mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=7 -march=armv7-a
-msoft-float -Uarm -fno-stack-protector -fomit-frame-pointer
-Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(arp)"
 -D"KBUILD_MODNAME=KBUILD_STR(arp)"  -c -o net/ipv4/arp.o net/ipv4/arp.c;
scripts/basic/fixdep net/ipv4/.arp.o.d net/ipv4/arp.o
'arm-none-linux-gnueabi-gcc -Wp,-MD,net/ipv4/.arp.o.d  -nostdinc -isystem
/scratch/paul/lite/linux/install/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/include
-Iinclude  -I/data1/uma/t/linux-2.6.30.9/arch/arm/include -include
include/linux/autoconf.h -D__KERNEL__ -mlittle-endian
-Iarch/arm/mach-sdp/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
-fno-delete-null-pointer-checks -Os -marm -mabi=aapcs-linux
-mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=7 -march=armv7-a
-msoft-float -Uarm -fno-stack-protector -fomit-frame-pointer
-Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
-D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(arp)"
 -D"KBUILD_MODNAME=KBUILD_STR(arp)"  -c -o net/ipv4/arp.o net/ipv4/arp.c' >
net/ipv4/.arp.o.tmp; rm -f net/ipv4/.arp.o.d; mv -f net/ipv4/.arp.o.tmp
net/ipv4/.arp.o.cmd


Best Regards
Naveen



















List



On Mon, Jan 11, 2010 at 8:20 PM, Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
wrote:
> naveen yadav wrote:
>
>> I am using Sourcery G++ Lite 2007q3-51 4.2.1, and i got below crash.
>> I check on mailing list at
>>
http://www.mail-archive.com/davinci-linux-open-source@xxxxxxxxxxxxxxxxxxxx/msg12029.html
>> it also facing exact same issue, will you pls let me know what is issue ?
>
>> Unable to handle kernel NULL pointer dereference at virtual address
00000000
>
> That's a kernel crash, not a compiler crash.  It's possible, of course,
> that a compiler defect has resulted in a miscompilation of the kernel --
> but it's more likely that the kernel (or a driver) has a bug that's
> causing the crash.  Unfortunately, there's no way for us to know; you
> will have to debug the problem.  If you think it's a compiler bug,
> you'll need to provide preprocessed source code for the piece of the
> kernel that's been miscompiled, command-line options passed to the
> compiler, and some evidence that it is indeed a compiler bug.
>
> --
> Mark Mitchell
> CodeSourcery
> mark@xxxxxxxxxxxxxxxx
> (650) 331-3385 x713
>