gecko-dev/mozglue/misc
Toshihito Kikuchi f6a7430688 Bug 1610790: Part 2 - Implement GetProcAddress for a remote process. r=handyman
This patch adds a function to get an exported function in a remote process.
We need this implementation to address Bug 1604008, Bug 1608645, and Bug 1610790.

When `WindowsDllInterceptor` detours a function in a remote process, we used the
native `GetProcAddress` locally, and then detours the returned address in the
target process.  The problem is if the caller's export table was modified, the
address returned from `GetProcAddress` might be invalid in the target process,
which is Bug 1604008.

I implemented `GetProcAddress` depending on both local and remote process image,
but it caused two regressions Bug 1608645 and Bug 1610790 because multiple
applications modify firefox's export table in multiple ways, such as replacing
an entry of EAT, replacing an RVA to Export section, or etc.

With this patch, we can use `PEExportSection<MMPolicy>::GetProcAddress` to get
an exported function in a remote process without relying on any local data so
that it's not impacted by modification of the local export table.

Differential Revision: https://phabricator.services.mozilla.com//D62315

Depends on D62314
2020-02-11 22:21:10 +02:00
..
decimal
interceptor Bug 1610790: Part 2 - Implement GetProcAddress for a remote process. r=handyman 2020-02-11 22:21:10 +02:00
AutoProfilerLabel.cpp Bug 1573273: Add ProfilerLabelBegin and ProfilerLabelEnd to mozglue; r=gerald 2019-08-14 03:46:41 +00:00
AutoProfilerLabel.h Bug 1573273: Add ProfilerLabelBegin and ProfilerLabelEnd to mozglue; r=gerald 2019-08-14 03:46:41 +00:00
ConditionVariable_posix.cpp
ConditionVariable_windows.cpp
Debug.h
DynamicallyLinkedFunctionPtr.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
ImportDir.h Bug 1610790: Part 2 - Implement GetProcAddress for a remote process. r=handyman 2020-02-11 22:21:10 +02:00
moz.build Bug 1598196 - Support disabling the linker on Android in the code. r=froydnj 2019-11-21 14:57:24 +00:00
Mutex_posix.cpp
Mutex_windows.cpp
MutexPlatformData_posix.h
MutexPlatformData_windows.h
NativeNt.h Bug 1610790: Part 2 - Implement GetProcAddress for a remote process. r=handyman 2020-02-11 22:21:10 +02:00
nsWindowsDllInterceptor.h Bug 1610790: Part 2 - Implement GetProcAddress for a remote process. r=handyman 2020-02-11 22:21:10 +02:00
PlatformConditionVariable.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
PlatformMutex.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
Printf.cpp Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj 2019-12-20 07:16:43 +00:00
Printf.h
StackWalk_windows.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
StackWalk.cpp Bug 1598196 - Support disabling the linker on Android in the code. r=froydnj 2019-11-21 14:57:24 +00:00
StackWalk.h Bug 1573090 - Part 2: Look up ELF symbol tables directly when pre-symbolicating Gecko profiles on Linux. r=gerald 2019-08-23 05:45:16 +00:00
TimeStamp_darwin.cpp Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in TimeStamp r=froydnj 2019-11-20 21:06:33 +00:00
TimeStamp_posix.cpp Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in various dirs r=glandium 2019-08-30 09:11:19 +00:00
TimeStamp_windows.cpp Bug 1601796 - Use GetSystemTimePreciseAsFileTime instead of GetSystemTime+SystemTimeToFileTime. r=mayhemer,aklotz 2020-01-08 16:53:17 +00:00
TimeStamp_windows.h
TimeStamp.cpp
TimeStamp.h
WindowsMapRemoteView.cpp Bug 1571875: Part 2 - Change over all existing static local uses of DynamicallyLinkedFunctionPtr to use StaticDynamicallyLinkedFunctionPtr instead; r=mhowell 2019-08-07 15:58:09 +00:00
WindowsMapRemoteView.h
WindowsProcessMitigations.cpp Bug 1571875: Part 2 - Change over all existing static local uses of DynamicallyLinkedFunctionPtr to use StaticDynamicallyLinkedFunctionPtr instead; r=mhowell 2019-08-07 15:58:09 +00:00
WindowsProcessMitigations.h
WindowsUnicode.cpp Bug 1542830: Part 4 - Modify mozglue to use new untrusted modules interfaces; r=mhowell 2019-09-23 20:18:41 +00:00
WindowsUnicode.h Bug 1542830: Part 4 - Modify mozglue to use new untrusted modules interfaces; r=mhowell 2019-09-23 20:18:41 +00:00
WinUtils.h Bug 1542830: Part 4 - Modify mozglue to use new untrusted modules interfaces; r=mhowell 2019-09-23 20:18:41 +00:00