Skip to contentSkip to conversation

cat /proc/bus/pnp/escd -> kernel segfault (2.6 BK)

DISCUSSION Matthias Andree 3 participants 4 messages Oct 27, 2003 – Oct 28, 2003

lore
Share & tools
lore
#0 lore raw

Doing cat /proc/bus/pnp/escd on my Linux 2.6 (BK) crashes:

Unable to handle kernel paging request at virtual address ffffa00a
 printing eip:
00007228
*pde = 00002067
*pte = 00000000
Oops: 0000 [#2]
CPU:    0
EIP:    0098:[<00007228>]    Not tainted
EFLAGS: 00010086

EIP is at 0x7228
eax: 000022ff ebx: 00b06196 ecx: 000000a0 edx: 00000000
esi: 0000000a edi: d1e70000 ebp: d1e773cf esp: d1e79e64
ds: 00b0 es: 00a8 ss: 0068
Process cat (pid: 23647, threadinfo=d1e78000 task=c43f6c80)

Stack: 000a0002 00b00000 000600a8 73d9720a 00000000 5f0a00a0 61af9e98 007b0000 
       8000007b 60040000 008200a8 d1e79eec 0090000b 00000042 00b000a8 000000a0 
       00000000 c0220c50 00000060 00000082 00000000 00000000 0000007b 0000007b 
Call Trace:
 [<c0220c50>] __pnp_bios_read_escd+0x110/0x1a0
 [<c0222080>] proc_read_escd+0x0/0x130
 [<c0220cf9>] pnp_bios_read_escd+0x19/0x50
 [<c0222080>] proc_read_escd+0x0/0x130
 [<c02220ea>] proc_read_escd+0x6a/0x130
 [<c0222080>] proc_read_escd+0x0/0x130
 [<c018896e>] proc_file_read+0x16e/0x290
 [<c0157e63>] vfs_read+0xd3/0x140
 [<c015811f>] sys_read+0x3f/0x60
 [<c010a41b>] syscall_call+0x7/0xb

Willing to provide further debug info, please send directions. This is an old Gigabyte 7ZX-R board (AMIBIOS).

Signature · 3 lines
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95
#1 lore raw
Quoted 31 lines · Matthias Andree

Doing cat /proc/bus/pnp/escd on my Linux 2.6 (BK) crashes:

Unable to handle kernel paging request at virtual address ffffa00a
 printing eip:
00007228
*pde = 00002067
*pte = 00000000
Oops: 0000 [#2]
CPU:    0
EIP:    0098:[<00007228>]    Not tainted
EFLAGS: 00010086

EIP is at 0x7228
eax: 000022ff ebx: 00b06196 ecx: 000000a0 edx: 00000000
esi: 0000000a edi: d1e70000 ebp: d1e773cf esp: d1e79e64
ds: 00b0 es: 00a8 ss: 0068
Process cat (pid: 23647, threadinfo=d1e78000 task=c43f6c80)

Stack: 000a0002 00b00000 000600a8 73d9720a 00000000 5f0a00a0 61af9e98 007b0000 
       8000007b 60040000 008200a8 d1e79eec 0090000b 00000042 00b000a8 000000a0 
       00000000 c0220c50 00000060 00000082 00000000 00000000 0000007b 0000007b 
Call Trace:
 [<c0220c50>] __pnp_bios_read_escd+0x110/0x1a0
 [<c0222080>] proc_read_escd+0x0/0x130
 [<c0220cf9>] pnp_bios_read_escd+0x19/0x50
 [<c0222080>] proc_read_escd+0x0/0x130
 [<c02220ea>] proc_read_escd+0x6a/0x130
 [<c0222080>] proc_read_escd+0x0/0x130
 [<c018896e>] proc_file_read+0x16e/0x290
 [<c0157e63>] vfs_read+0xd3/0x140
 [<c015811f>] sys_read+0x3f/0x60
 [<c010a41b>] syscall_call+0x7/0xb
Quoted 3 lines

Willing to provide further debug info, please send directions. This is an old Gigabyte 7ZX-R board (AMIBIOS).

Does this patch fix it?

--
Brian Gerst

arch/i386/mm/extable.c +1 -1
diff -urN linux-2.6.0-test9-bk/arch/i386/mm/extable.c linux/arch/i386/mm/extable.c
@@ -34,7 +34,7 @@
 	const struct exception_table_entry *fixup;
 
 #ifdef CONFIG_PNPBIOS
-	if (unlikely((regs->xcs | 8) == 0x88)) /* 0x80 or 0x88 */
+	if (unlikely((unsigned)(regs->xcs - (GDT_ENTRY_PNPBIOS_BASE * 8)) < 16))
 	{
 		extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
 		extern u32 pnp_bios_is_utter_crap;
#2 lore raw
Quoted 1 line · Brian Gerst

Does this patch fix it?

Unfortunately not. I am not seeing SIGSEGV or something, the machine freezes hard instead.

Quoted 12 lines

diff -urN linux-2.6.0-test9-bk/arch/i386/mm/extable.c linux/arch/i386/mm/extable.c

arch/i386/mm/extable.c +1 -1
@@ -34,7 +34,7 @@
 	const struct exception_table_entry *fixup;
 
 #ifdef CONFIG_PNPBIOS
-	if (unlikely((regs->xcs | 8) == 0x88)) /* 0x80 or 0x88 */
+	if (unlikely((unsigned)(regs->xcs - (GDT_ENTRY_PNPBIOS_BASE * 8)) < 16))
 	{
 		extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
 		extern u32 pnp_bios_is_utter_crap;
Signature · 3 lines
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95
#3 lore raw
Quoted 7 lines · Matthias Andree
Quoted 1 line · Brian Gerst

Does this patch fix it?

Unfortunately not. I am not seeing SIGSEGV or something, the machine freezes hard instead.

I was having a simliar problem, except my machine seemed to recover from the error. With this patch applied, I get a double-fault:

PNPBIOS fault.. attempting recovery.
double fault, gdt at c02bbe20 [255 bytes]
double fault, tss at c031ca00
eip = ca2f9e10, esp = 00000028
eax = 00000000, ebx = ca2f9e0c, ecx = 00000097, edx = c02bf11c esi = 00000000, edi = c01187f0

Here is how the addresses resolve in /proc/kallsyms:
c02bbe20 is in _etext
c031ca00 is in km_waitq [ipv6]
ca2f9e10 is in __crc_rtc_control [rtc] ca2f9e0c is in __crc_rtc_control [rtc] c02bf11c is in __PAGE_KERNEL [agpgart] c01187f0 is in do_page_fault