糟糕:坏区的内核访问,sig:11 - 'swapper' - 杀死中断处理程序

Chr*_*ris 5 linux kernel powerpc linux-kernel

在嵌入式 linux 环境(PowerPC 上定制的 2.4.25)中,几个小时后我得到以下内核恐慌:

Oops: kernel access of bad area, sig: 11
NIP: C9471C7C XER: 20000000 LR: C0018C74 SP: C0198E20 REGS: c0198d70 TRAP: 0800    Not tainted
MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DEAR: C9876FFF, ESR: 00000000
TASK = c0197020[0] 'swapper' Last syscall: 120
last math 00000000 last altivec 00000000
PLB0: bear= 0x48041040 acr=   0x00000000 besr=  0x00000000
PLB0 to OPB: bear= 0x00cc1000 besr0= 0x00000000 besr1= 0x00000000

GPR00: 00000000 C0198E20 C0197020 00000000 C016E494 000000C2 C01D0000 00000000
GPR08: C98701F0 C9876FFF 00008000 C768AE0F 24004022 1001B120 07FC9500 00000000
GPR16: 00000001 00000001 FFFFFFFF 007FFE00 00001032 00198EE0 00000000 C0004780
GPR24: C01D2F68 C01E0000 C0170000 C0170000 C01B0000 C9473870 00000000 C9473864
Call backtrace:
00000001 C0018C74 C0018A1C C0005E14 C0004780 C0022724 C0005D4C
C0005D60 C0002430 C01AE5BC C0002328
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler - not syncing
 <0>Rebooting in 1 seconds...
Run Code Online (Sandbox Code Playgroud)

猫/过程/模块:

CustomModule1          10556   4
CustomModule2           5488   0
CustomModule3          10240   1
fuse                   35576   4
usb-storage            28468   0 (unused)
keybdev                 3076   0 (unused)
mousedev                6116   0 (unused)
hid                    17968   0 (unused)
input                   6192   0 [keybdev mouse
Run Code Online (Sandbox Code Playgroud)

ksyms -m:

Address   Symbol                 Defined by
c9471000  (11k)                  [CustomModule1]
c9471b74  functionA              [CustomModule1]
c947358c  functionB              [CustomModule1]
c9473580  functionC              [CustomModule1]
...
Run Code Online (Sandbox Code Playgroud)

I googled for help but I could not find something useful. A also wanted to 'decode' the backtrace, but I dont understand how.... the addresses do not correspond to the addresses in System.map. Can anyone explain me how to find out the error?

Thanks, chris

ctu*_*fli 4

NIP是下一个指令指针或更一般地是程序计数器(又名PC),并指示内核 oops 的位置。根据 ksyms 的输出,NIP ( 0xC9471C7C) 的内容看起来在 中functionA。您应该能够在functionA模块上使用 objdump -S 并找出 处的指令functionA+0x108

链接寄存器 ( LR ) 保存当前函数的返回地址并指示 的调用者functionA。您可以在 System.map 文件中查找包含此地址的函数,也可以在 vmlinux 映像上使用 GNU binutils 程序 addr2line 来获取相同的信息。从那里,您应该能够更好地了解导致 oops 的原因。

有关 PPC 寄存器和汇编的更多信息,请参见此处此处。