gecko-dev/mozglue
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
..
android Bug 1598196 - Support disabling the linker on Android in the code. r=froydnj 2019-11-21 14:57:24 +00:00
baseprofiler Bug 1609996 - Fix some things that the automated replacement didn't catch. r=froydnj 2020-01-20 16:18:28 +00:00
build Bug 1602689 - whitelist RegisteredThread::RegisteredThread r=decoder,gerald 2020-01-30 20:21:31 +00:00
dllservices Bug 1610790: Part 2 - Implement GetProcAddress for a remote process. r=handyman 2020-02-11 22:21:10 +02:00
linker Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj 2019-12-20 07:16:43 +00:00
misc Bug 1610790: Part 2 - Implement GetProcAddress for a remote process. r=handyman 2020-02-11 22:21:10 +02:00
static Bug 1594998 - Make standalone SpiderMonkey use libxul-like panic. r=froydnj 2019-11-15 13:14:42 +00:00
tests 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