From f07947d41cd617dc909d28692469e7e81139fdfd Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Mon, 30 Jul 2018 12:13:00 +1000 Subject: [PATCH] Updated ntdll-NtQueryVirtualMemory patchset Added patch ntdll: Unsupported stub for MemoryWorkingSetExInformation --- ...d-stub-for-MemoryWorkingSetExInforma.patch | 41 +++++++++++++++++++ patches/patchinstall.sh | 4 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 patches/ntdll-NtQueryVirtualMemory/0009-ntdll-Unsupported-stub-for-MemoryWorkingSetExInforma.patch diff --git a/patches/ntdll-NtQueryVirtualMemory/0009-ntdll-Unsupported-stub-for-MemoryWorkingSetExInforma.patch b/patches/ntdll-NtQueryVirtualMemory/0009-ntdll-Unsupported-stub-for-MemoryWorkingSetExInforma.patch new file mode 100644 index 00000000..9bb80365 --- /dev/null +++ b/patches/ntdll-NtQueryVirtualMemory/0009-ntdll-Unsupported-stub-for-MemoryWorkingSetExInforma.patch @@ -0,0 +1,41 @@ +From cb8b12121ca11c88fcb78439ccd6b4f549e1895a Mon Sep 17 00:00:00 2001 +From: Andrew Wesie +Date: Mon, 23 Jul 2018 19:30:54 -0700 +Subject: [PATCH] ntdll: Unsupported stub for MemoryWorkingSetExInformation. + +Implemented in Windows Vista. This will cause programs to fail if Wine version +is higher than Windows XP / 2003. +--- + dlls/ntdll/virtual.c | 1 + + include/winternl.h | 3 ++- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c +index 36f0aef..a39ca94 100644 +--- a/dlls/ntdll/virtual.c ++++ b/dlls/ntdll/virtual.c +@@ -3135,6 +3135,7 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr, + + UNIMPLEMENTED_INFO_CLASS(MemoryWorkingSetList); + UNIMPLEMENTED_INFO_CLASS(MemoryBasicVlmInformation); ++ UNIMPLEMENTED_INFO_CLASS(MemoryWorkingSetExInformation); + + default: + FIXME("(%p,%p,info_class=%d,%p,%ld,%p) Unknown information class\n", +diff --git a/include/winternl.h b/include/winternl.h +index 2ea22ed..8924d76 100644 +--- a/include/winternl.h ++++ b/include/winternl.h +@@ -1038,7 +1038,8 @@ typedef enum _MEMORY_INFORMATION_CLASS { + MemoryBasicInformation, + MemoryWorkingSetList, + MemorySectionName, +- MemoryBasicVlmInformation ++ MemoryBasicVlmInformation, ++ MemoryWorkingSetExInformation + } MEMORY_INFORMATION_CLASS; + + typedef struct _MEMORY_SECTION_NAME +-- +1.9.1 + diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 32f962a2..9b3b776a 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -5124,7 +5124,7 @@ fi # | # | Modified files: # | * dlls/kernel32/virtual.c, dlls/ntdll/directory.c, dlls/ntdll/ntdll_misc.h, dlls/ntdll/tests/info.c, dlls/ntdll/virtual.c, -# | dlls/psapi/tests/psapi_main.c, server/mapping.c, server/protocol.def +# | dlls/psapi/tests/psapi_main.c, include/winternl.h, server/mapping.c, server/protocol.def # | if test "$enable_ntdll_NtQueryVirtualMemory" -eq 1; then patch_apply ntdll-NtQueryVirtualMemory/0002-ntdll-Split-logic-for-MemoryBasicInformation-into-a-.patch @@ -5134,6 +5134,7 @@ if test "$enable_ntdll_NtQueryVirtualMemory" -eq 1; then patch_apply ntdll-NtQueryVirtualMemory/0006-ntdll-Allow-to-query-section-names-from-other-proces.patch patch_apply ntdll-NtQueryVirtualMemory/0007-kernel32-Implement-K32GetMappedFileName.-v2.patch patch_apply ntdll-NtQueryVirtualMemory/0008-ntdll-Resolve-drive-symlinks-before-returning-sectio.patch + patch_apply ntdll-NtQueryVirtualMemory/0009-ntdll-Unsupported-stub-for-MemoryWorkingSetExInforma.patch ( printf '%s\n' '+ { "Dmitry Timoshkov", "ntdll: Split logic for MemoryBasicInformation into a separate function.", 1 },'; printf '%s\n' '+ { "Dmitry Timoshkov", "ntdll: Implement NtQueryVirtualMemory(MemorySectionName).", 3 },'; @@ -5142,6 +5143,7 @@ if test "$enable_ntdll_NtQueryVirtualMemory" -eq 1; then printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Allow to query section names from other processes.", 2 },'; printf '%s\n' '+ { "Dmitry Timoshkov", "kernel32: Implement K32GetMappedFileName.", 2 },'; printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Resolve drive symlinks before returning section name.", 1 },'; + printf '%s\n' '+ { "Andrew Wesie", "ntdll: Unsupported stub for MemoryWorkingSetExInformation.", 1 },'; ) >> "$patchlist" fi