[Bug 21982] DPC Latency Checker barfs loading its driver

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Mar 8 14:48:11 CST 2010


http://bugs.winehq.org/show_bug.cgi?id=21982


Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net




--- Comment #1 from Anastasius Focht <focht at gmx.net>  2010-03-08 14:48:10 ---
Hello,

--- quote ---
This tool loads a driver that just measures "delayed procedure call"
latency, seems like that ought to be supportable.  Currently crashes 
on startup:
--- quote ---

I doubt that as Wine is userspace only and IRQL + kernel DPCs have no meaning
here.
So the tool's "usefulness" is limited to filling out some gaps/adding more
hal/ntoskrnl stubs.

Alexandre uses the relocation directory RVA entry as hint if relocations have
already been processed for native subsystem binaries.
The PE header page protection is explicitly adjusted to read-only upon mapping:

--- dlls/ntdll/virtual.c ---
static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T
total_size, SIZE_T mask, SIZE_T header_size, int shared_fd, HANDLE dup_mapping,
PVOID *addr_ptr )
{ 
...
    /* set the image protections */

    VIRTUAL_SetProt( view, ptr, ROUND_SIZE( 0, header_size ), VPROT_COMMITTED |
VPROT_READ );

    sec = (IMAGE_SECTION_HEADER*)((char
*)&nt->OptionalHeader+nt->FileHeader.SizeOfOptionalHeader); 
...
}
--- dlls/ntdll/virtual.c ---

Native subsystem relocations are specially processed hence I suggest to
temporarily adjust page protection in winedevice' load_driver_module() to set
the hint (VirtualProtect before and after reloc hint).

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list