当前位置: 技术问答>linux和unix
编译驱动后,测试出现的问题,待解????
来源: 互联网 发布时间:2017-02-17
本文导语: Unable to handle kernel NULL pointer dereference at virtual address 0000001c pgd = c384c000 [0000001c] *pgd=3000a031, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] Modules linked in: CPU: 0 PC is at devfsd_read+0x54/0x534 LR is at __ini...
Unable to handle kernel NULL pointer dereference at virtual address 0000001c
pgd = c384c000
[0000001c] *pgd=3000a031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
Modules linked in:
CPU: 0
PC is at devfsd_read+0x54/0x534
LR is at __init_begin+0x3fff8000/0x2c
pc : [] lr : [] Not tainted
sp : c000ded4 ip : 00000000 fp : c000df4c
r10: c000c000 r9 : c000c000 r8 : c000df78
r7 : c000c000 r6 : beb35e1c r5 : c3e1d9e0 r4 : c000defc
r3 : c000df78 r2 : 00000014 r1 : 00000000 r0 : c000defc
Flags: NzCv IRQs on FIQs on Mode SVC_32 Segment user
Control: 717F Table: 3384C000 DAC: 00000015
Process test (pid: 27, stack limit = 0xc000c194)
Stack: (0xc000ded4 to 0xc000e000)
dec0: c3eebf70 00000000 c000df0c
dee0: c000deec c0072cb8 c005c330 00000000 c000df78 00000001 beb35e1c c0023ec4
df00: c000df6c c000df10 c0072e08 c0072bc8 c3eebf70 c03141e0 c3de8300 00000000
df20: 00000003 00000001 c3e1d9e0 beb35e1c 00000000 c000df78 c000c000 c000c000
df40: c000df74 c000df50 c0073974 c00af27c c3e1da00 c3e1d9e0 c000df78 00000000
df60: 00000000 4013aeb0 c000dfa4 c000df78 c0073d00 c00738c4 00000000 00000000
df80: 00000000 beb35e74 000084b8 00000001 00000003 c0023ec4 00000000 c000dfa8
dfa0: c0023d40 c0073cc4 beb35e74 c01c6eb0 00000003 beb35e1c 00000001 beb35e1c
dfc0: beb35e74 000084b8 00000001 00008504 00008430 00000000 4013aeb0 beb35e48
dfe0: 00000000 beb35e14 00003b7c 400deed0 60000010 00000003 00000000 00000000
Backtrace:
[] (devfsd_read+0x0/0x534) from [] (vfs_read+0xc0/0x17c)
[] (vfs_read+0x0/0x17c) from [] (sys_read+0x4c/0x74)
[] (sys_read+0x0/0x74) from [] (ret_fast_syscall+0x0/0x2c)
r8 = C0023EC4 r7 = 00000003 r6 = 00000001 r5 = 000084B8
r4 = BEB35E74
Code: e50b305c e3a02014 e1a00004 e3c7703f (e59e901c)
Unable to handle kernel NULL pointer dereference at virtual address 00000018
pgd = c0004000
[00000018] *pgd=00000000
Internal error: Oops: 17 [#2]
Modules linked in:
CPU: 0
PC is at devfsd_close+0x14/0x98
LR is at __fput+0xa4/0x140
pc : [] lr : [] Not tainted
sp : c000dcc8 ip : c000dce4 fp : c000dce0
r10: c000c000 r9 : c000de8c r8 : c3eebf70
r7 : c03141e0 r6 : c397daac r5 : 00000008 r4 : 00000000
r3 : c3e32800 r2 : c3e1da58 r1 : c3e1d9e0 r0 : c397daac
Flags: NzCv IRQs on FIQs on Mode SVC_32 Segment user
Control: 717F Table: 3384C000 DAC: 00000015
Process test (pid: 27, stack limit = 0xc000c194)
Stack: (0xc000dcc8 to 0xc000e000)
dcc0: c3e1d9e0 00000008 c397daac c000dd04 c000dce4 c0074ac0
dce0: c00af7b0 c3e1d9e0 00000000 c0308ac0 c0308ac8 00000001 c000dd14 c000dd08
dd00: c0074b9c c0074a2c c000dd30 c000dd18 c0073150 c0074b6c 00000001 c0308ac0
dd20: 00000003 c000dd54 c000dd34 c003b1fc c00730e8 00000000 00000001 c3de8300
dd40: 00000001 0000000b c000dd74 c000dd58 c003b9a8 c003b178 c3de8300 c000dd88
dd60: 60000093 c000dd78 c000dd88 c000dd78 c0028ed0 c003b83c bf000000 c000dda8
dd80: c000dd8c c002a6cc c0028ca8 ffffffec c3de8300 c3fdd4ec c001e8c0 c000dde0
dda0: c000ddac c002a9e8 c002a670 c3e2ea4c 00000000 00000017 ffffffff c0203fb0
ddc0: 00000017 c000de8c 0000001c a0000013 c000c000 c000de88 c000dde4 c002ab40
dde0: c002a7fc 00000000 c000df10 c000de44 c000ddfc c0082b18 c008bdec c000de4c
de00: c000de0c 00000101 c03141e0 c3eebf70 28c7c3a5 0000000a c3fe9005 c000df10
de20: c000de44 c000de30 c008be00 c00c94f0 c000df10 c000de48 c000dea4 c000de48
de40: c0082e1c c008bdec c3dff090 c0314ae0 c0391ec0 c000de74 c000de64 c00c9e44
de60: c00ca6e8 c0320ac0 ffffffff c000dec0 beb35e1c c000c000 c000df78 c000df4c
de80: c000de8c c00237c0 c002ab14 c000defc 00000000 00000014 c000df78 c000defc
dea0: c3e1d9e0 beb35e1c c000c000 c000df78 c000c000 c000c000 c000df4c 00000000
dec0: c000ded4 00000000 c00af2c0 a0000013 ffffffff c3eebf70 00000000 c000df0c
dee0: c000deec c0072cb8 c005c330 00000000 c000df78 00000001 beb35e1c c0023ec4
df00: c000df6c c000df10 c0072e08 c0072bc8 c3eebf70 c03141e0 c3de8300 00000000
df20: 00000003 00000001 c3e1d9e0 beb35e1c 00000000 c000df78 c000c000 c000c000
df40: c000df74 c000df50 c0073974 c00af27c c3e1da00 c3e1d9e0 c000df78 00000000
df60: 00000000 4013aeb0 c000dfa4 c000df78 c0073d00 c00738c4 00000000 00000000
df80: 00000000 beb35e74 000084b8 00000001 00000003 c0023ec4 00000000 c000dfa8
dfa0: c0023d40 c0073cc4 beb35e74 c01c6eb0 00000003 beb35e1c 00000001 beb35e1c
dfc0: beb35e74 000084b8 00000001 00008504 00008430 00000000 4013aeb0 beb35e48
dfe0: 00000000 beb35e14 00003b7c 400deed0 60000010 00000003 00000000 00000000
Backtrace:
[] (devfsd_close+0x0/0x98) from [] (__fput+0xa4/0x140)
r6 = C397DAAC r5 = 00000008 r4 = C3E1D9E0
[] (__fput+0x0/0x140) from [] (fput+0x40/0x44)
r8 = 00000001 r7 = C0308AC8 r6 = C0308AC0 r5 = 00000000
r4 = C3E1D9E0
[] (fput+0x0/0x44) from [] (filp_close+0x78/0x84)
[] (filp_close+0x0/0x84) from [] (put_files_struct+0x94/0xd4)
r6 = 00000003 r5 = C0308AC0 r4 = 00000001
[] (put_files_struct+0x0/0xd4) from [] (do_exit+0x17c/0xa70)
r8 = 0000000B r7 = 00000001 r6 = C3DE8300 r5 = 00000001
r4 = 00000000
[] (do_exit+0x0/0xa70) from [] (die+0x238/0x274)
[] (die+0x0/0x274) from [] (__do_kernel_fault+0x6c/0x7c)
[] (__do_kernel_fault+0x0/0x7c) from [] (do_page_fault+0x1fc/0x214)
r7 = C001E8C0 r6 = C3FDD4EC r5 = C3DE8300 r4 = FFFFFFEC
[] (do_page_fault+0x0/0x214) from [] (do_DataAbort+0x3c/0xa0)
[] (do_DataAbort+0x0/0xa0) from [] (__dabt_svc+0x40/0x60)
r8 = C000DF78 r7 = C000C000 r6 = BEB35E1C r5 = C000DEC0
r4 = FFFFFFFF
[] (devfsd_read+0x0/0x534) from [] (vfs_read+0xc0/0x17c)
[] (vfs_read+0x0/0x17c) from [] (sys_read+0x4c/0x74)
[] (sys_read+0x0/0x74) from [] (ret_fast_syscall+0x0/0x2c)
r8 = C0023EC4 r7 = 00000003 r6 = 00000001 r5 = 000084B8
r4 = BEB35E74
Code: e92dd870 e24cb004 e5903094 e5934160 (e5943018)
Fixing recursive fault but reboot is needed!
这些是什么意思啊???
pgd = c384c000
[0000001c] *pgd=3000a031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1]
Modules linked in:
CPU: 0
PC is at devfsd_read+0x54/0x534
LR is at __init_begin+0x3fff8000/0x2c
pc : [] lr : [] Not tainted
sp : c000ded4 ip : 00000000 fp : c000df4c
r10: c000c000 r9 : c000c000 r8 : c000df78
r7 : c000c000 r6 : beb35e1c r5 : c3e1d9e0 r4 : c000defc
r3 : c000df78 r2 : 00000014 r1 : 00000000 r0 : c000defc
Flags: NzCv IRQs on FIQs on Mode SVC_32 Segment user
Control: 717F Table: 3384C000 DAC: 00000015
Process test (pid: 27, stack limit = 0xc000c194)
Stack: (0xc000ded4 to 0xc000e000)
dec0: c3eebf70 00000000 c000df0c
dee0: c000deec c0072cb8 c005c330 00000000 c000df78 00000001 beb35e1c c0023ec4
df00: c000df6c c000df10 c0072e08 c0072bc8 c3eebf70 c03141e0 c3de8300 00000000
df20: 00000003 00000001 c3e1d9e0 beb35e1c 00000000 c000df78 c000c000 c000c000
df40: c000df74 c000df50 c0073974 c00af27c c3e1da00 c3e1d9e0 c000df78 00000000
df60: 00000000 4013aeb0 c000dfa4 c000df78 c0073d00 c00738c4 00000000 00000000
df80: 00000000 beb35e74 000084b8 00000001 00000003 c0023ec4 00000000 c000dfa8
dfa0: c0023d40 c0073cc4 beb35e74 c01c6eb0 00000003 beb35e1c 00000001 beb35e1c
dfc0: beb35e74 000084b8 00000001 00008504 00008430 00000000 4013aeb0 beb35e48
dfe0: 00000000 beb35e14 00003b7c 400deed0 60000010 00000003 00000000 00000000
Backtrace:
[] (devfsd_read+0x0/0x534) from [] (vfs_read+0xc0/0x17c)
[] (vfs_read+0x0/0x17c) from [] (sys_read+0x4c/0x74)
[] (sys_read+0x0/0x74) from [] (ret_fast_syscall+0x0/0x2c)
r8 = C0023EC4 r7 = 00000003 r6 = 00000001 r5 = 000084B8
r4 = BEB35E74
Code: e50b305c e3a02014 e1a00004 e3c7703f (e59e901c)
Unable to handle kernel NULL pointer dereference at virtual address 00000018
pgd = c0004000
[00000018] *pgd=00000000
Internal error: Oops: 17 [#2]
Modules linked in:
CPU: 0
PC is at devfsd_close+0x14/0x98
LR is at __fput+0xa4/0x140
pc : [] lr : [] Not tainted
sp : c000dcc8 ip : c000dce4 fp : c000dce0
r10: c000c000 r9 : c000de8c r8 : c3eebf70
r7 : c03141e0 r6 : c397daac r5 : 00000008 r4 : 00000000
r3 : c3e32800 r2 : c3e1da58 r1 : c3e1d9e0 r0 : c397daac
Flags: NzCv IRQs on FIQs on Mode SVC_32 Segment user
Control: 717F Table: 3384C000 DAC: 00000015
Process test (pid: 27, stack limit = 0xc000c194)
Stack: (0xc000dcc8 to 0xc000e000)
dcc0: c3e1d9e0 00000008 c397daac c000dd04 c000dce4 c0074ac0
dce0: c00af7b0 c3e1d9e0 00000000 c0308ac0 c0308ac8 00000001 c000dd14 c000dd08
dd00: c0074b9c c0074a2c c000dd30 c000dd18 c0073150 c0074b6c 00000001 c0308ac0
dd20: 00000003 c000dd54 c000dd34 c003b1fc c00730e8 00000000 00000001 c3de8300
dd40: 00000001 0000000b c000dd74 c000dd58 c003b9a8 c003b178 c3de8300 c000dd88
dd60: 60000093 c000dd78 c000dd88 c000dd78 c0028ed0 c003b83c bf000000 c000dda8
dd80: c000dd8c c002a6cc c0028ca8 ffffffec c3de8300 c3fdd4ec c001e8c0 c000dde0
dda0: c000ddac c002a9e8 c002a670 c3e2ea4c 00000000 00000017 ffffffff c0203fb0
ddc0: 00000017 c000de8c 0000001c a0000013 c000c000 c000de88 c000dde4 c002ab40
dde0: c002a7fc 00000000 c000df10 c000de44 c000ddfc c0082b18 c008bdec c000de4c
de00: c000de0c 00000101 c03141e0 c3eebf70 28c7c3a5 0000000a c3fe9005 c000df10
de20: c000de44 c000de30 c008be00 c00c94f0 c000df10 c000de48 c000dea4 c000de48
de40: c0082e1c c008bdec c3dff090 c0314ae0 c0391ec0 c000de74 c000de64 c00c9e44
de60: c00ca6e8 c0320ac0 ffffffff c000dec0 beb35e1c c000c000 c000df78 c000df4c
de80: c000de8c c00237c0 c002ab14 c000defc 00000000 00000014 c000df78 c000defc
dea0: c3e1d9e0 beb35e1c c000c000 c000df78 c000c000 c000c000 c000df4c 00000000
dec0: c000ded4 00000000 c00af2c0 a0000013 ffffffff c3eebf70 00000000 c000df0c
dee0: c000deec c0072cb8 c005c330 00000000 c000df78 00000001 beb35e1c c0023ec4
df00: c000df6c c000df10 c0072e08 c0072bc8 c3eebf70 c03141e0 c3de8300 00000000
df20: 00000003 00000001 c3e1d9e0 beb35e1c 00000000 c000df78 c000c000 c000c000
df40: c000df74 c000df50 c0073974 c00af27c c3e1da00 c3e1d9e0 c000df78 00000000
df60: 00000000 4013aeb0 c000dfa4 c000df78 c0073d00 c00738c4 00000000 00000000
df80: 00000000 beb35e74 000084b8 00000001 00000003 c0023ec4 00000000 c000dfa8
dfa0: c0023d40 c0073cc4 beb35e74 c01c6eb0 00000003 beb35e1c 00000001 beb35e1c
dfc0: beb35e74 000084b8 00000001 00008504 00008430 00000000 4013aeb0 beb35e48
dfe0: 00000000 beb35e14 00003b7c 400deed0 60000010 00000003 00000000 00000000
Backtrace:
[] (devfsd_close+0x0/0x98) from [] (__fput+0xa4/0x140)
r6 = C397DAAC r5 = 00000008 r4 = C3E1D9E0
[] (__fput+0x0/0x140) from [] (fput+0x40/0x44)
r8 = 00000001 r7 = C0308AC8 r6 = C0308AC0 r5 = 00000000
r4 = C3E1D9E0
[] (fput+0x0/0x44) from [] (filp_close+0x78/0x84)
[] (filp_close+0x0/0x84) from [] (put_files_struct+0x94/0xd4)
r6 = 00000003 r5 = C0308AC0 r4 = 00000001
[] (put_files_struct+0x0/0xd4) from [] (do_exit+0x17c/0xa70)
r8 = 0000000B r7 = 00000001 r6 = C3DE8300 r5 = 00000001
r4 = 00000000
[] (do_exit+0x0/0xa70) from [] (die+0x238/0x274)
[] (die+0x0/0x274) from [] (__do_kernel_fault+0x6c/0x7c)
[] (__do_kernel_fault+0x0/0x7c) from [] (do_page_fault+0x1fc/0x214)
r7 = C001E8C0 r6 = C3FDD4EC r5 = C3DE8300 r4 = FFFFFFEC
[] (do_page_fault+0x0/0x214) from [] (do_DataAbort+0x3c/0xa0)
[] (do_DataAbort+0x0/0xa0) from [] (__dabt_svc+0x40/0x60)
r8 = C000DF78 r7 = C000C000 r6 = BEB35E1C r5 = C000DEC0
r4 = FFFFFFFF
[] (devfsd_read+0x0/0x534) from [] (vfs_read+0xc0/0x17c)
[] (vfs_read+0x0/0x17c) from [] (sys_read+0x4c/0x74)
[] (sys_read+0x0/0x74) from [] (ret_fast_syscall+0x0/0x2c)
r8 = C0023EC4 r7 = 00000003 r6 = 00000001 r5 = 000084B8
r4 = BEB35E74
Code: e92dd870 e24cb004 e5903094 e5934160 (e5943018)
Fixing recursive fault but reboot is needed!
这些是什么意思啊???
|
Unable to handle kernel NULL pointer dereference at virtual address 0000001c
你的驱动怎么写的?内存获取正确不?居然操作到0000001c去了?
你的驱动怎么写的?内存获取正确不?居然操作到0000001c去了?
|
如果是内嵌汇编,可以自己设定部分寄存器的值
驱动的问题,基本上得用kdb去调了,具体的步骤,不是一句两句能说清楚的,你得找资料系统的看一下
|
呵呵,自己改写文件系统哦...
在如下两个函数处理中,貌似你的指针飞了哦...
在如下两个函数处理中,貌似你的指针飞了哦...
devfsd_read()
devfsd_close()
|
确实貌似 devfsd_read 和 devfsd_close 这两个函数处理中指针飞了...
|
假如用户程序传错了指针给驱动,就会出错。
|
如果你没改文件系统部分,那么貌似就是在你的驱动了吧...
|
Unable to handle kernel NULL pointer dereference at virtual address 0000001c
不能操作内核空指针,一个作废虚拟地址: 0x0000001c
重点查查你的驱动程序里用的指针。
不能操作内核空指针,一个作废虚拟地址: 0x0000001c
重点查查你的驱动程序里用的指针。
|
无知
|
???如果ioctl需要一个正确的指针,而调用的时候你给 NULL,难道不会出错?
|
很明显你的驱动程序里面操作了非法的内存地址,仔细检查一下驱动里面跟内存相关的内容