WOW64: Call Wow64ProcessPendingCrossProcessItems on syscalls

This is needed to handle code invalidation requests sent by external
processes.
This commit is contained in:
Billy Laws committed 2023-11-18 00:16:44 +00:00
1 parent e91c5ff906
commit a78ffeeaba
3 files changed
+12 -9

No files matched your search

+10 -9
View File
@@ -22,12 +22,13 @@ EXPORTS
Wow64PassExceptionToGuest @16
Wow64PrepareForDebuggerAttach @17 PRIVATE
Wow64PrepareForException @18
Wow64RaiseException @19
Wow64ShallowThunkAllocObjectAttributes32TO64_FNC @20 PRIVATE
Wow64ShallowThunkAllocSecurityQualityOfService32TO64_FNC @21 PRIVATE
Wow64ShallowThunkSIZE_T32TO64 @22 PRIVATE
Wow64ShallowThunkSIZE_T64TO32 @23 PRIVATE
Wow64SuspendLocalThread @24
Wow64SystemServiceEx @25
Wow64ValidateUserCallTarget @26 PRIVATE
Wow64ValidateUserCallTargetFilter @27 PRIVATE
Wow64ProcessPendingCrossProcessItems @19
Wow64RaiseException @20
Wow64ShallowThunkAllocObjectAttributes32TO64_FNC @21 PRIVATE
Wow64ShallowThunkAllocSecurityQualityOfService32TO64_FNC @22 PRIVATE
Wow64ShallowThunkSIZE_T32TO64 @23 PRIVATE
Wow64ShallowThunkSIZE_T64TO32 @24 PRIVATE
Wow64SuspendLocalThread @25 PRIVATE
Wow64SystemServiceEx @26
Wow64ValidateUserCallTarget @27 PRIVATE
Wow64ValidateUserCallTargetFilter @28 PRIVATE
+1
View File
@@ -460,6 +460,7 @@ public:
const uint64_t EntryRAX = Frame->State.gregs[FEXCore::X86State::REG_RAX];
Context::UnlockJITContext();
Wow64ProcessPendingCrossProcessItems();
ReturnRAX = static_cast<uint64_t>(Wow64SystemServiceEx(static_cast<UINT>(EntryRAX),
reinterpret_cast<UINT *>(ReturnRSP + 4)));
Context::LockJITContext();
+1
View File
@@ -90,6 +90,7 @@ typedef enum _MEMORY_INFORMATION_CLASS {
} MEMORY_INFORMATION_CLASS;
NTSTATUS WINAPI Wow64SystemServiceEx(UINT,UINT*);
void WINAPI Wow64ProcessPendingCrossProcessItems(void);
NTSTATUS WINAPI RtlWow64SetThreadContext(HANDLE,const WOW64_CONTEXT*);
NTSTATUS WINAPI RtlWow64GetThreadContext(HANDLE,WOW64_CONTEXT*);