http://bugs.winehq.org/show_bug.cgi?id=21982
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #1 from Anastasius Focht focht@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