Hi,
I just compile new CVS Tree (module plex86) and I got OOPS with
default plex86.conf.
Following oops tracking.
Unable to handle kernel NULL pointer dereference at virtual address 00000000
current->tss.cr3 = 015cb000, %cr3 = 015cb000
*pde = 00000000
Oops: 0002
CPU: 0
EIP: 0010:[<c9097c93>]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010082
eax: 00000000 ebx: c908e000 ecx: c5ba0000 edx: 00000000
esi: c908e000 edi: c908e000 ebp: c33f7f38 esp: c33f7eac
ds: 0018 es: 0018 ss: 0018
Process plex86 (pid: 6473, process nr: 46, stackpage=c33f7000)
Stack: c298a000 c017844e c298a000 00000000 c33f7ed3 c90965d6 c908e000 00297318
c05efd00 00000082 08056680 c908e000 c33f7f84 c0178953 c298a000 0000000a
0c7e3b32 c90963db c908e000 08056680 080566cc c90963ce c908e000 c33f7f38
Call Trace: [<c017844e>] [<c0178953>] [<c017a5ad>] [<c012d743>] [<c0108fb8>]
Code: 89 02 8b 83 e8 40 00 00 0f b6 40 31 83 c0 f6 83 f8 04 77 09
>>EIP; c9097c93 <END_OF_CODE+161f7/????> <=====
Trace; c017844e <tty_default_put_char+1e/28>
Trace; c0178953 <opost+1af/1bc>
Trace; c017a5ad <write_chan+125/1f8>
Trace; c012d743 <sys_ioctl+16b/188>
Trace; c0108fb8 <system_call+34/38>
Code; c9097c93 <END_OF_CODE+161f7/????>
00000000 <_EIP>:
Code; c9097c93 <END_OF_CODE+161f7/????> <=====
0: 89 02 movl %eax,(%edx) <=====
Code; c9097c95 <END_OF_CODE+161f9/????>
2: 8b 83 e8 40 00 movl 0x40e8(%ebx),%eax
Code; c9097c9a <END_OF_CODE+161fe/????>
7: 00
Code; c9097c9b <END_OF_CODE+161ff/????>
8: 0f b6 40 31 movzbl 0x31(%eax),%eax
Code; c9097c9f <END_OF_CODE+16203/????>
c: 83 c0 f6 addl $0xfffffff6,%eax
Code; c9097ca2 <END_OF_CODE+16206/????>
f: 83 f8 04 cmpl $0x4,%eax
Code; c9097ca5 <END_OF_CODE+16209/????>
12: 77 09 ja 1d <_EIP+0x1d> c9097cb0 <END_OF_CODE+16214/????>
With objdump --disassemble-all plex86.o, I find offent function:
00001bf8 <host2guest>:
1bf8: 83 ec 18 subl $0x18,%esp
1bfb: 53 pushl %ebx
1bfc: 8b 5c 24 20 movl 0x20(%esp,1),%ebx
1c00: 83 bb 9c 40 00 cmpl $0x0,0x409c(%ebx)
1c05: 00 00
1c07: 75 0f jne 1c18 <host2guest+0x20>
1c09: 8b 83 e8 40 00 movl 0x40e8(%ebx),%eax
1c0e: 00
1c0f: c7 40 30 00 0c movl $0xc00,0x30(%eax)
1c14: 00 00
1c16: eb 74 jmp 1c8c <host2guest+0x94>
1c18: 8b 83 b4 40 00 movl 0x40b4(%ebx),%eax
1c1d: 00
1c1e: 8b 80 bc 00 00 movl 0xbc(%eax),%eax
1c23: 00
1c24: 05 ec 40 00 00 addl $0x40ec,%eax
1c29: 89 03 movl %eax,(%ebx)
1c2b: 8b 83 d8 40 00 movl 0x40d8(%ebx),%eax
1c30: 00
1c31: ff d0 call *%eax
1c33: 8b 93 e4 40 00 movl 0x40e4(%ebx),%edx
1c38: 00
1c39: 8d 83 a0 40 00 leal 0x40a0(%ebx),%eax
1c3e: 00
1c3f: 89 03 movl %eax,(%ebx)
1c41: 8b 83 e0 40 00 movl 0x40e0(%ebx),%eax
1c46: 00
1c47: 89 02 movl %eax,(%edx) <==== HERE
1c49: 8b 83 e8 40 00 movl 0x40e8(%ebx),%eax
1c4e: 00
1c4f: 0f b6 40 31 movzbl 0x31(%eax),%eax
1c53: 83 c0 f6 addl $0xfffffff6,%eax
1c56: 83 f8 04 cmpl $0x4,%eax
1c59: 77 09 ja 1c64 <host2guest+0x6c>
1c5b: ff 24 85 78 07 jmp *0x778(,%eax,4)
1c60: 00 00
1c62: 89 f6 movl %esi,%esi
1c64: c7 83 9c 40 00 movl $0x0,0x409c(%ebx)
1c69: 00 00 00 00 00
1c6e: eb 1c jmp 1c8c <host2guest+0x94>
1c70: 83 c4 f4 addl $0xfffffff4,%esp
1c73: 53 pushl %ebx
1c74: e8 97 fd ff ff call 1a10 <unmap_monitor>
1c79: 83 c4 f4 addl $0xfffffff4,%esp
1c7c: 53 pushl %ebx
1c7d: e8 5e f9 ff ff call 15e0 <map_monitor>
1c82: 83 c4 20 addl $0x20,%esp
1c85: e9 76 ff ff ff jmp 1c00 <host2guest+0x8>
1c8a: 89 f6 movl %esi,%esi
1c8c: 5b popl %ebx
1c8d: 83 c4 18 addl $0x18,%esp
1c90: c3 ret
1c91: 8d 76 00 leal 0x0(%esi),%esi
I have add .c.s rule in kernel/Makefile and make monitor.s:
.stabn 68,0,642,.LM256-host2guest
.LM256:
movl 16608(%ebx),%eax
movl %eax,(%edx) <==== HERE
.stabn 68,0,644,.LM257-host2guest
.LM257:
movl 16616(%ebx),%eax
movzbl 49(%eax),%eax
addl $-10,%eax
cmpl $4,%eax
ja .L76
jmp *.L81(,%eax,4)
.p2align 2
OOPS match line 642 which is:
// Restore page mapping for current code page. The TLB
// trick code mapped it to the private code page.
* vm->host.codepage_pte_p = vm->host.codepage_pte_saved;
Hope this help.
--
Edouard G. Parmelan
http://egp.free.fr