From: Hartmut Birr
Log message:
- Rewrote (copied from ntdll) parts of the relocation
and import fixup code.
- Don't load no-load sections at the end of the driver.
- Don't relocate the relocation section itself.
- Set the correct page protection for section which are
executable.
With current CVS, the VMware SVGA driver crashes. It happens in a HwFindAdapter() call. While tracing through the driver, I got this eery "I've been here before" feeling. And sure enough, I fixed this same crash about a year and a half ago.
The problem is that vmx_svga.sys has a section alignment of 0x20 instead of the normal 0x1000. So, sections are much smaller than the page size. When setting the page protections you need to take into account all the sections which might be mapped to that page. This was implemented in ntoskrnl/ldr/loader.c rev 1.126.
Gé van Geldorp.
Hi,
in my opinion, LdrLookupPageProtection does the right job. Can you send my the vmvare drivers for testing?
- Hartmut
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Ge van Geldorp Sent: Tuesday, September 28, 2004 9:47 PM To: 'ReactOS Development List' Subject: [ros-dev] Page protection ldr change breaks VMware SVGA driver
With current CVS, the VMware SVGA driver crashes. It happens in a HwFindAdapter() call. While tracing through the driver, I got this eery "I've been here before" feeling. And sure enough, I fixed this same crash about a year and a half ago.
The problem is that vmx_svga.sys has a section alignment of 0x20 instead of the normal 0x1000. So, sections are much smaller than the page size. When setting the page protections you need to take into account all the sections which might be mapped to that page. This was implemented in ntoskrnl/ldr/loader.c rev 1.126.
Gé van Geldorp.
Hi all...
Just got the latest source, but I'm still getting a crash when trying to load ROS with the vmware video driver. I'm choosing 1024x768 and 16bit mode...
here is the debug output:
(ke/i386/kernel.c:327) CPU Vendor: GenuineIntel (ke/i386/kernel.c:331) CPU Model: Intel(R) Pentium(R) M processor 1400MHz (ke/i386/kernel.c:334) Ke386CacheAlignment: 64 DriverBase for \SystemRoot\system32\drivers\pci.sys: dcada000 Peripheral Component Interconnect Bus Driver DriverBase for scsiport.sys: dcae4000 DriverBase for atapi.sys: dcaf0000 DriverBase for class2.sys: dcaff000 DriverBase for disk.sys: dcb09000 DriverBase for vfatfs.sys: dcb11000 DriverBase for bootvid.sys: dcb26000 DriverBase for ndis.sys: dcb46000 DriverBase for \SystemRoot\system32\drivers\pcntn5m.sys: dcb85000 DriverBase for \SystemRoot\system32\drivers\vmx_svga.sys: dcb97000 DriverBase for \SystemRoot\system32\drivers\VIDEOPRT.SYS: dcbb7000 KeBugCheckWithTf at ke/catch.c:164 Bug detected (code 1e param 0 0 0 0) KMODE_EXCEPTION_NOT_HANDLED
Page Fault Exception: 14(3) Processor: 0 CS:EIP 8:dcb99451 <vmx_svga.sys: 2451> cr2 dcb99c60 cr3 2a6000 Proc: c0261010 Pid: 1 <SYSTEM> Thrd: c0261d58 Tid: 1 DS 10 ES 10 FS 30 GS 10 EAX: 00000000 EBX: c0318214 ECX: 00000000 EDX: 00000000 EBP: c00b0a08 ESI: dcb974d0 ESP: c00b08c8 EDI: 0000000b EFLAGS: 00210246 kESP c00b08c8 kernel stack base c00ae000 Frames: <vmx_svga.sys: 1c0f> <VIDEOPRT.SYS: 22d3> <VIDEOPRT.SYS: 10a5> <ntoskrnl.exe: 3297c> <ntoskrnl.exe: 3c922> <ntoskrnl.exe: 3c991> <ntoskrnl.exe: 3bf54> <ntoskrnl.exe: 3bf8c> <ntoskrnl.exe: 3bf8c> <ntoskrnl.exe: 3bfd2> <ntoskrnl.exe: 3c9f7> <C0092AF1>
Thanks and good work so far.
--mark Ge van Geldorp wrote:
From: Hartmut Birr
can you test a little patch for me ?
Works perfectly. Thanks!
Gé.
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Hi,
do you use the latest cvs? I've loaded vmx_svga.sys in bochs and don't get crash. I've added some debug code in LdrLookupPageProtection and can see that the rva 2000h is set to PAGE_EXECUTE_READWRITE. Your crash occurs at rva 2c60h. This address should be writable after my fix.
- Hartmut
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Mark Tempel Sent: Wednesday, September 29, 2004 4:13 AM To: ReactOS Development List Subject: Re: [ros-dev] Page protection ldr change breaks VMware SVGA driver
Hi all...
Just got the latest source, but I'm still getting a crash when trying to load ROS with the vmware video driver. I'm choosing 1024x768 and 16bit mode...
here is the debug output:
(ke/i386/kernel.c:327) CPU Vendor: GenuineIntel (ke/i386/kernel.c:331) CPU Model: Intel(R) Pentium(R) M processor 1400MHz (ke/i386/kernel.c:334) Ke386CacheAlignment: 64 DriverBase for \SystemRoot\system32\drivers\pci.sys: dcada000 Peripheral Component Interconnect Bus Driver DriverBase for scsiport.sys: dcae4000 DriverBase for atapi.sys: dcaf0000 DriverBase for class2.sys: dcaff000 DriverBase for disk.sys: dcb09000 DriverBase for vfatfs.sys: dcb11000 DriverBase for bootvid.sys: dcb26000 DriverBase for ndis.sys: dcb46000 DriverBase for \SystemRoot\system32\drivers\pcntn5m.sys: dcb85000 DriverBase for \SystemRoot\system32\drivers\vmx_svga.sys: dcb97000 DriverBase for \SystemRoot\system32\drivers\VIDEOPRT.SYS: dcbb7000 KeBugCheckWithTf at ke/catch.c:164 Bug detected (code 1e param 0 0 0 0) KMODE_EXCEPTION_NOT_HANDLED
Page Fault Exception: 14(3) Processor: 0 CS:EIP 8:dcb99451 <vmx_svga.sys: 2451> cr2 dcb99c60 cr3 2a6000 Proc: c0261010 Pid: 1 <SYSTEM> Thrd: c0261d58 Tid: 1 DS 10 ES 10 FS 30 GS 10 EAX: 00000000 EBX: c0318214 ECX: 00000000 EDX: 00000000 EBP: c00b0a08 ESI: dcb974d0 ESP: c00b08c8 EDI: 0000000b EFLAGS: 00210246 kESP c00b08c8 kernel stack base c00ae000 Frames: <vmx_svga.sys: 1c0f> <VIDEOPRT.SYS: 22d3> <VIDEOPRT.SYS: 10a5> <ntoskrnl.exe: 3297c> <ntoskrnl.exe: 3c922> <ntoskrnl.exe: 3c991> <ntoskrnl.exe: 3bf54> <ntoskrnl.exe: 3bf8c> <ntoskrnl.exe: 3bf8c> <ntoskrnl.exe: 3bfd2> <ntoskrnl.exe: 3c9f7> <C0092AF1>
I'm getting the latest code right now, and I'll try again....
Thanks,
--mark
Hartmut Birr wrote:
Hi,
do you use the latest cvs? I've loaded vmx_svga.sys in bochs and don't get crash. I've added some debug code in LdrLookupPageProtection and can see that the rva 2000h is set to PAGE_EXECUTE_READWRITE. Your crash occurs at rva 2c60h. This address should be writable after my fix.
- Hartmut
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Mark Tempel Sent: Wednesday, September 29, 2004 4:13 AM To: ReactOS Development List Subject: Re: [ros-dev] Page protection ldr change breaks VMware SVGA driver
Hi all...
Just got the latest source, but I'm still getting a crash when trying to load ROS with the vmware video driver. I'm choosing 1024x768 and 16bit mode...
here is the debug output:
(ke/i386/kernel.c:327) CPU Vendor: GenuineIntel (ke/i386/kernel.c:331) CPU Model: Intel(R) Pentium(R) M processor 1400MHz (ke/i386/kernel.c:334) Ke386CacheAlignment: 64 DriverBase for \SystemRoot\system32\drivers\pci.sys: dcada000 Peripheral Component Interconnect Bus Driver DriverBase for scsiport.sys: dcae4000 DriverBase for atapi.sys: dcaf0000 DriverBase for class2.sys: dcaff000 DriverBase for disk.sys: dcb09000 DriverBase for vfatfs.sys: dcb11000 DriverBase for bootvid.sys: dcb26000 DriverBase for ndis.sys: dcb46000 DriverBase for \SystemRoot\system32\drivers\pcntn5m.sys: dcb85000 DriverBase for \SystemRoot\system32\drivers\vmx_svga.sys: dcb97000 DriverBase for \SystemRoot\system32\drivers\VIDEOPRT.SYS: dcbb7000 KeBugCheckWithTf at ke/catch.c:164 Bug detected (code 1e param 0 0 0 0) KMODE_EXCEPTION_NOT_HANDLED
Page Fault Exception: 14(3) Processor: 0 CS:EIP 8:dcb99451 <vmx_svga.sys: 2451> cr2 dcb99c60 cr3 2a6000 Proc: c0261010 Pid: 1 <SYSTEM> Thrd: c0261d58 Tid: 1 DS 10 ES 10 FS 30 GS 10 EAX: 00000000 EBX: c0318214 ECX: 00000000 EDX: 00000000 EBP: c00b0a08 ESI: dcb974d0 ESP: c00b08c8 EDI: 0000000b EFLAGS: 00210246 kESP c00b08c8 kernel stack base c00ae000 Frames: <vmx_svga.sys: 1c0f> <VIDEOPRT.SYS: 22d3> <VIDEOPRT.SYS: 10a5> <ntoskrnl.exe: 3297c> <ntoskrnl.exe: 3c922> <ntoskrnl.exe: 3c991> <ntoskrnl.exe: 3bf54> <ntoskrnl.exe: 3bf8c> <ntoskrnl.exe: 3bf8c> <ntoskrnl.exe: 3bfd2> <ntoskrnl.exe: 3c9f7> <C0092AF1>
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev