diff --git a/debian/changelog b/debian/changelog index f60ccea4..7dc3e2c5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ wine-compholio (1.7.31) UNRELEASED; urgency=low * Added patch to fix crash of winedevice when relocation entry crosses page boundary. * Added patch to emulate 'mov Eb, Gb' instruction on x86 processor architecture. * Added patch to emulate access to KI_USER_SHARED_DATA kernel page on x86_64. + * Added patch to initialize irp.Tail.Overlay.OriginalFileObject with stub file object. * Removed patch for iphlpapi stub functions (accepted upstream). * Removed patches for FindFirstFileExW (accepted upstream). * Removed patches for TLB dependencies lookup in resources (accepted upstream). diff --git a/patches/Makefile b/patches/Makefile index 2ffaca4d..d98e622e 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -72,6 +72,7 @@ PATCHLIST := \ ntoskrnl-IoCsqInitialize.ok \ ntoskrnl-Irp_Status.ok \ ntoskrnl-KeSetSystemAffinityThread.ok \ + ntoskrnl-Stub_FileObject.ok \ ntoskrnl-Write_CR4.ok \ ole32-CoWaitForMultipleHandles.ok \ quartz-MediaSeeking_Positions.ok \ @@ -1193,6 +1194,21 @@ ntoskrnl-KeSetSystemAffinityThread.ok: echo '+ { "ntoskrnl-KeSetSystemAffinityThread", "Michael Müller", "Add stub for KeSetSystemAffinityThread." },'; \ ) > ntoskrnl-KeSetSystemAffinityThread.ok +# Patchset ntoskrnl-Stub_FileObject +# | +# | Included patches: +# | * Initialize irp.Tail.Overlay.OriginalFileObject with stub file object. [by Sebastian Lackner] +# | +# | Modified files: +# | * dlls/ntoskrnl.exe/ntoskrnl.c +# | +.INTERMEDIATE: ntoskrnl-Stub_FileObject.ok +ntoskrnl-Stub_FileObject.ok: + $(call APPLY_FILE,ntoskrnl-Stub_FileObject/0001-ntoskrnl-Initialize-irp.Tail.Overlay.OriginalFileObj.patch) + @( \ + echo '+ { "ntoskrnl-Stub_FileObject", "Sebastian Lackner", "Initialize irp.Tail.Overlay.OriginalFileObject with stub file object." },'; \ + ) > ntoskrnl-Stub_FileObject.ok + # Patchset ntoskrnl-Write_CR4 # | # | Included patches: diff --git a/patches/ntoskrnl-Stub_FileObject/0001-ntoskrnl-Initialize-irp.Tail.Overlay.OriginalFileObj.patch b/patches/ntoskrnl-Stub_FileObject/0001-ntoskrnl-Initialize-irp.Tail.Overlay.OriginalFileObj.patch new file mode 100644 index 00000000..45a35e03 --- /dev/null +++ b/patches/ntoskrnl-Stub_FileObject/0001-ntoskrnl-Initialize-irp.Tail.Overlay.OriginalFileObj.patch @@ -0,0 +1,51 @@ +From b8a93a6c879b8bd2d49cb43755cf8180d5372525 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Mon, 10 Nov 2014 23:48:14 +0100 +Subject: ntoskrnl: Initialize irp.Tail.Overlay.OriginalFileObject with stub + file object. + +--- + dlls/ntoskrnl.exe/ntoskrnl.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c +index 1d87110..aee68b3 100644 +--- a/dlls/ntoskrnl.exe/ntoskrnl.c ++++ b/dlls/ntoskrnl.exe/ntoskrnl.c +@@ -142,6 +142,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, + IRP irp; + MDL mdl; + IO_STACK_LOCATION irpsp; ++ FILE_OBJECT file; + PDRIVER_DISPATCH dispatch = device->DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL]; + NTSTATUS status; + LARGE_INTEGER count; +@@ -152,6 +153,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, + memset( &irp, 0x55, sizeof(irp) ); + memset( &irpsp, 0x66, sizeof(irpsp) ); + memset( &mdl, 0x77, sizeof(mdl) ); ++ memset( &file, 0x88, sizeof(file) ); + + irp.RequestorMode = UserMode; + if ((code & 3) == METHOD_BUFFERED) +@@ -166,6 +168,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, + irp.UserBuffer = out_buff; + irp.MdlAddress = &mdl; + irp.Tail.Overlay.s.u2.CurrentStackLocation = &irpsp; ++ irp.Tail.Overlay.OriginalFileObject = &file; + irp.UserIosb = NULL; + + irpsp.MajorFunction = IRP_MJ_DEVICE_CONTROL; +@@ -182,6 +185,9 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, + mdl.ByteCount = *out_size; + mdl.ByteOffset = 0; + ++ file.FsContext = NULL; ++ file.FsContext2 = NULL; ++ + device->CurrentIrp = &irp; + + KeQueryTickCount( &count ); /* update the global KeTickCount */ +-- +2.1.3 + diff --git a/patches/ntoskrnl-Stub_FileObject/definition b/patches/ntoskrnl-Stub_FileObject/definition new file mode 100644 index 00000000..878d324d --- /dev/null +++ b/patches/ntoskrnl-Stub_FileObject/definition @@ -0,0 +1,3 @@ +Author: Sebastian Lackner +Subject: Initialize irp.Tail.Overlay.OriginalFileObject with stub file object. +Revision: 1