wow64cpu-Wow64Transition: Add patchset.

This commit is contained in:
Zebediah Figura
2018-08-08 22:57:52 -05:00
parent ec218012c3
commit 2c7a662655
6 changed files with 207 additions and 26 deletions

View File

@@ -0,0 +1,87 @@
From 9598e08f8b900be94d23df995105b210c4f7567f Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Tue, 7 Aug 2018 21:05:56 -0500
Subject: [PATCH 1/2] wow64cpu: Add stub dll.
---
configure | 2 ++
configure.ac | 1 +
dlls/wow64cpu/Makefile.in | 1 +
dlls/wow64cpu/wow64cpu.spec | 25 +++++++++++++++++++++++++
4 files changed, 29 insertions(+)
create mode 100644 dlls/wow64cpu/Makefile.in
create mode 100644 dlls/wow64cpu/wow64cpu.spec
diff --git a/configure b/configure
index 337ce91..477fe02 100755
--- a/configure
+++ b/configure
@@ -1612,6 +1612,7 @@ enable_wmp
enable_wmphoto
enable_wmvcore
enable_wnaspi32
+enable_wow64cpu
enable_wpc
enable_wpcap
enable_ws2_32
@@ -19952,6 +19953,7 @@ wine_fn_config_makefile dlls/wmvcore enable_wmvcore
wine_fn_config_makefile dlls/wmvcore/tests enable_tests
wine_fn_config_makefile dlls/wnaspi32 enable_wnaspi32
wine_fn_config_makefile dlls/wow32 enable_win16
+wine_fn_config_makefile dlls/wow64cpu enable_wow64cpu
wine_fn_config_makefile dlls/wpc enable_wpc
wine_fn_config_makefile dlls/wpc/tests enable_tests
wine_fn_config_makefile dlls/wpcap enable_wpcap
diff --git a/configure.ac b/configure.ac
index be247ea..376b818 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3813,6 +3813,7 @@ WINE_CONFIG_MAKEFILE(dlls/wmvcore)
WINE_CONFIG_MAKEFILE(dlls/wmvcore/tests)
WINE_CONFIG_MAKEFILE(dlls/wnaspi32)
WINE_CONFIG_MAKEFILE(dlls/wow32,enable_win16)
+WINE_CONFIG_MAKEFILE(dlls/wow64cpu)
WINE_CONFIG_MAKEFILE(dlls/wpc)
WINE_CONFIG_MAKEFILE(dlls/wpc/tests)
WINE_CONFIG_MAKEFILE(dlls/wpcap)
diff --git a/dlls/wow64cpu/Makefile.in b/dlls/wow64cpu/Makefile.in
new file mode 100644
index 0000000..261363f
--- /dev/null
+++ b/dlls/wow64cpu/Makefile.in
@@ -0,0 +1 @@
+MODULE = wow64cpu.dll
diff --git a/dlls/wow64cpu/wow64cpu.spec b/dlls/wow64cpu/wow64cpu.spec
new file mode 100644
index 0000000..2d074ee
--- /dev/null
+++ b/dlls/wow64cpu/wow64cpu.spec
@@ -0,0 +1,25 @@
+@ stub CpuFlushInstructionCache
+@ stub CpuGetContext
+@ stub CpuGetStackPointer
+@ stub CpuInitializeStartupContext
+@ stub CpuNotifyAffinityChange
+@ stub CpuNotifyAfterFork
+@ stub CpuNotifyBeforeFork
+@ stub CpuNotifyDllLoad
+@ stub CpuNotifyDllUnload
+@ stub CpuPrepareForDebuggerAttach
+@ stub CpuProcessDebugEvent
+@ stub CpuProcessInit
+@ stub CpuProcessTerm
+@ stub CpuResetFloatingPoint
+@ stub CpuResetToConsistentState
+@ stub CpuSetContext
+@ stub CpuSetInstructionPointer
+@ stub CpuSetStackPointer
+@ stub CpuSimulate
+@ stub CpuSuspendLocalThread
+@ stub CpuSuspendThread
+@ stub CpuThreadInit
+@ stub CpuThreadTerm
+@ stub TurboDispatchJumpAddressEnd
+@ stub TurboDispatchJumpAddressStart
--
2.7.4

View File

@@ -0,0 +1,60 @@
From 97251c147d843617cf2e3fcf3f273ea779d39742 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 8 Aug 2018 20:00:15 -0500
Subject: [PATCH 2/2] ntdll: Add a stub implementation of Wow64Transition.
---
dlls/ntdll/loader.c | 9 ++++++++-
dlls/ntdll/ntdll.spec | 1 +
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index df206e8..e37aec2 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3493,15 +3493,17 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
return TRUE;
}
+void *Wow64Transition;
/***********************************************************************
* __wine_process_init
*/
void __wine_process_init(void)
{
+ static const WCHAR wow64cpuW[] = {'w','o','w','6','4','c','p','u','.','d','l','l',0};
static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
- WINE_MODREF *wm;
+ WINE_MODREF *wm, *wow64cpu_wm;
NTSTATUS status;
ANSI_STRING func_name;
void (* DECLSPEC_NORETURN CDECL init_func)(void);
@@ -3517,6 +3519,11 @@ void __wine_process_init(void)
/* setup the load callback and create ntdll modref */
wine_dll_set_callback( load_builtin_callback );
+ if ((status = load_builtin_dll( NULL, wow64cpuW, 0, 0, &wow64cpu_wm )) == STATUS_SUCCESS)
+ Wow64Transition = wow64cpu_wm->ldr.BaseAddress;
+ else
+ WARN( "could not load wow64cpu.dll, status %#x\n", status );
+
if ((status = load_builtin_dll( NULL, kernel32W, 0, 0, &wm )) != STATUS_SUCCESS)
{
MESSAGE( "wine: could not load kernel32.dll, status %x\n", status );
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index d321c44..3a7a144 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1034,6 +1034,7 @@
@ stdcall WinSqmIsOptedIn()
@ stdcall WinSqmSetDWORD(ptr long long)
@ stdcall WinSqmStartSession(ptr long long)
+@ extern Wow64Transition
@ stdcall -private ZwAcceptConnectPort(ptr long ptr long ptr ptr) NtAcceptConnectPort
@ stdcall -private ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck
@ stdcall -private ZwAccessCheckAndAuditAlarm(ptr long ptr ptr ptr long ptr long ptr ptr ptr) NtAccessCheckAndAuditAlarm
--
2.7.4

View File

@@ -0,0 +1 @@
Fixes: [45567] League of Legends 8.12+ fails to start a game (anticheat engine, validation of WoW64 syscall dispatcher)