Граф коммитов

330 Коммитов

Автор SHA1 Сообщение Дата
Yannis Juglaret ebe4314873 Backed out changeset 98eadcb92105 (Bug 1878993) for causing bug 1892612. r=#win-reviewers CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D208112
2024-04-22 09:39:15 +00:00
Chris Peterson 37395249a0 Bug 1891332 - Replace debug MOZ_ASSERT with MOZ_RELEASE_ASSERT in Windows tests. r=win-reviewers,rkraesig
And MOZ_ASSERT_UNREACHABLE with MOZ_CRASH.

MOZ_ASSERT and MOZ_ASSERT_UNREACHABLE are only checked in debug builds, so release builds' tests are not checking these assertions (though these tests could still have failed later with less-obvious errors).

Depends on D207377

Differential Revision: https://phabricator.services.mozilla.com/D207378
2024-04-17 21:07:31 +00:00
Ray Kraesig 53b6a1a652 Bug 1878993 - [1/1] Inform Windows about different process types r=win-reviewers,ipc-reviewers,yjuglaret,nika
Windows has an ill-documented subsystem known as the Application Launch
Prefetcher, which apparently preloads DLLs for a binary based on what
DLLs that binary loaded last time.

For Firefox, that's not a great heuristic; we relaunch ourselves as a
subprocess with potentially completely different DLL settings. We're not
the only such application, though, and Windows _does_ have a way to
signal the ALPF to load different DLL sets depending on launch context.

Differential Revision: https://phabricator.services.mozilla.com/D202275
2024-03-06 22:55:23 +00:00
Gabriele Svelto aa43fa218e Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
  and have the crash reporting code own the copy) or registered. Several
  annotations are changed to use this functionality so that we don't need to
  update them as their value change.
- The code in the exception handler is modified to read the annotations from
  the mozannotation_client crate. This has the unfortunate side-effect that
  we need three different bits of code to serialize them: one for annotations
  read from a child process, one for reading annotations from the main process
  outside of the exception handler and one for reading annotations from the
  main process within the exception handler. As we move to fully
  out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
  I realized as I was working on this that storing types at runtime has two
  issues: the first one is that buggy code might change the type of an
  annotation (that is record it under two different types at two different
  moments), the second issue is that types might become corrupt during a
  crash, so better enforce them at annotation-writing time. The end result is
  that the mozannotation_* crates now only store byte buffers, track the
  format the data is stored in (null-terminated string, fixed size buffer,
  etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
  enforced when they're written out. If an annotation doesn't match the
  expected type it's skipped. Storing an annotation with the wrong type will
  also trigger an assertion in debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D195248
2024-03-04 10:24:43 +00:00
Butkovits Atila 2d2e424a0d Backed out changeset dccf526bcc0a (bug 1878993) for causing build bustages at GeckoChildProcessHost.cpp. CLOSED TREE 2024-02-24 12:51:38 +02:00
Ray Kraesig 4a91b62a35 Bug 1878993 - [1/1] Inform Windows about different process types r=win-reviewers,yjuglaret
Windows has an ill-documented subsystem known as the Application Launch
Prefetcher, which apparently preloads DLLs for a binary based on what
DLLs that binary loaded last time.

For Firefox, that's not a great heuristic; we relaunch ourselves as a
subprocess with potentially completely different DLL settings. We're not
the only such application, though, and Windows _does_ have a way to
signal the ALPF to load different DLL sets depending on launch context.

Differential Revision: https://phabricator.services.mozilla.com/D202275
2024-02-23 18:05:18 +00:00
Greg Stoll f12b482463 Bug 1872995 - Make prespawn CIG work again on Nightly if there are no entries on dynamic blocklist r=yjuglaret,win-reviewers,mhowell,bobowen
Differential Revision: https://phabricator.services.mozilla.com/D198039
2024-01-12 12:29:33 +00:00
Masatoshi Kimura 81027b292e Bug 1859445 - Do not include grandchilren into a job object. r=mhowell,win-reviewers,rkraesig,bobowen
Differential Revision: https://phabricator.services.mozilla.com/D191168
2023-10-19 09:06:40 +00:00
Masatoshi Kimura 2c64d3bab2 Bug 1852806 - Remove macros for older Windows SDK from browser/app/winlauncher/. r=mhowell
Depends on D188018

Differential Revision: https://phabricator.services.mozilla.com/D188019
2023-09-15 03:19:26 +00:00
Cosmin Sabou f8c16a8f94 Backed out 15 changesets (bug 1852806) for causing mda failures on test_video_low_power_telemetry.html. CLOSED TREE
Backed out changeset faea1f4cb9a9 (bug 1852806)
Backed out changeset 4db93c374f9b (bug 1852806)
Backed out changeset 7e40e0e04921 (bug 1852806)
Backed out changeset b0a66c4269ce (bug 1852806)
Backed out changeset 4ff3545936f9 (bug 1852806)
Backed out changeset 02c0a8eb3fd6 (bug 1852806)
Backed out changeset ae2c7b33acfb (bug 1852806)
Backed out changeset 2b89ba254a1a (bug 1852806)
Backed out changeset dfa4f73fc548 (bug 1852806)
Backed out changeset daffcc4c1877 (bug 1852806)
Backed out changeset 33855bcdf15e (bug 1852806)
Backed out changeset 694f29707f3e (bug 1852806)
Backed out changeset 1891eda22a59 (bug 1852806)
Backed out changeset 1b854941389c (bug 1852806)
Backed out changeset 2f7cfe04be59 (bug 1852806)
2023-09-15 09:48:27 +03:00
Masatoshi Kimura 15f512b588 Bug 1852806 - Remove macros for older Windows SDK from browser/app/winlauncher/. r=mhowell
Depends on D188018

Differential Revision: https://phabricator.services.mozilla.com/D188019
2023-09-15 03:19:26 +00:00
Yannis Juglaret 9361f6d10e Bug 1836225 - Prevent stack walking deadlock with MOZ_PROFILER_STARTUP=1. r=handyman
We currently fail to guarantee that OnEndDllLoad is called on the same
gLoaderObserver as OnBeginDllLoad. We must implement additional
synchronization to prevent a race condition where a call to
LoaderPrivateAPIImp::SetObserver would come in between the two and
change gLoaderObserver.

This has led to issues when using MOZ_PROFILER_STARTUP=1 where we would
have sStackWalkSuppressions reach (size_t)-1 instead of 0, later
resulting in deadlock or missing stacks. See bug 1687510 comment 10 for
extra details.

Depends on D181436

Differential Revision: https://phabricator.services.mozilla.com/D181437
2023-09-13 14:32:51 +00:00
Yannis Juglaret b8426d4705 Bug 1850969 - Protect patched_NtMapViewOfSection against SharedSection::ConvertToReadOnly. r=gstoll
Third-party products can start threads in our main process, which can load DLLs before the main thread has gone past SharedSection::ConvertToReadOnly. This patch therefore protects the use of the shared section within patched_NtMapViewOfSection, to guarantee that there is no race condition where the shared section could get converted while being used.

Differential Revision: https://phabricator.services.mozilla.com/D187913
2023-09-12 12:04:55 +00:00
Ray Kraesig c5290e5239 Bug 1850969 - Save off and restore values in patched_NtMapViewOfSection's arguments r=gstoll
NtMapViewOfSection doesn't write to its out-pointer arguments if it
returns an error. Mimic its behavior a little more closely by ensuring
that whatever values were present are restored if we unmap and abort.

Avoid taking any pointers to the stack while doing so.

Differential Revision: https://phabricator.services.mozilla.com/D187737
2023-09-08 21:34:51 +00:00
Masatoshi Kimura aba7dab929 Bug 1844908 - Remove pre-Win10-specific codepath from DLL Blocklist Services. r=gstoll
Differential Revision: https://phabricator.services.mozilla.com/D184304
2023-07-26 08:52:53 +00:00
Masatoshi Kimura 8d754481cc Bug 1844908 - Remove pre-Win10-specific codepath from browser/app/winlauncher/. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D184287
2023-07-26 08:52:50 +00:00
Natalia Csoregi 72a7b95555 Backed out 19 changesets (bug 1844908) for causing win bustage on AvailableMemoryTracker.cpp. CLOSED TREE
Backed out changeset 44c66f2233cf (bug 1844908)
Backed out changeset a8010ff534bf (bug 1844908)
Backed out changeset 225dc3aeb220 (bug 1844908)
Backed out changeset a1414db64e33 (bug 1844908)
Backed out changeset 7f1e0a527839 (bug 1844908)
Backed out changeset 6dc7646d1ffa (bug 1844908)
Backed out changeset 8d715131510f (bug 1844908)
Backed out changeset 4b6fe8a4e7db (bug 1844908)
Backed out changeset 2b419fabf1e8 (bug 1844908)
Backed out changeset af84e701d616 (bug 1844908)
Backed out changeset 2fa203969ec5 (bug 1844908)
Backed out changeset 2b3d2df94db3 (bug 1844908)
Backed out changeset 7eca452f5fd7 (bug 1844908)
Backed out changeset 3d961cf25afe (bug 1844908)
Backed out changeset 3c59143f8dd7 (bug 1844908)
Backed out changeset ab50c6c5425a (bug 1844908)
Backed out changeset b2c5636df673 (bug 1844908)
Backed out changeset e9a0f1c6760c (bug 1844908)
Backed out changeset 945ccbedde0b (bug 1844908)
2023-07-25 19:55:35 +03:00
Masatoshi Kimura a67273d4a2 Bug 1844908 - Remove pre-Win10-specific codepath from DLL Blocklist Services. r=gstoll
Differential Revision: https://phabricator.services.mozilla.com/D184304
2023-07-25 14:41:04 +00:00
Masatoshi Kimura 0c614bf546 Bug 1844908 - Remove pre-Win10-specific codepath from browser/app/winlauncher/. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D184287
2023-07-25 14:41:01 +00:00
Yannis Juglaret 91d79a1b97 Bug 1842088 - Avoid blocking blocked modules when loaded as image resources on Windows 7. r=gstoll
Our blocklist code must allow loading blocked modules using
LoadLibraryExW with LOAD_LIBRARY_AS_IMAGE_RESOURCE, so that we can
collect information about them when we want to send untrusted module
pings. This means that we need a trustworthy way to distinguish between
these loads and regular DLL loads.

Currently, we do the distinction by looking at the AllocationProtect
field for the virtual memory mapped for the view. This solution was
introduced with bug 1702717, but unfortunately it doesn't work with
Windows 7. This - mixed with other reasons - has resulted in the crash
spike in bug 1842368.

We should thus move to a more trustworthy solution to distinguish
between these two kinds of DLL loads. The new solution is to instead
check whether the permission to map executable views was asked when the
section that we are mapping was created. Because this solution is past
proof, it also has more chances to be future proof.

Differential Revision: https://phabricator.services.mozilla.com/D183530
2023-07-25 06:44:19 +00:00
Yannis Juglaret 7046c056aa Bug 1841751 - Block instances of a malicious injected DLL causing startup crashes. r=gstoll
With bug 1832467 we have updated our Windows SDK version to 10.0.19041.
As a result, we now have a .retplne section in xul.dll, starting with
Firefox 115. This is a section with PAGE_NOACCESS protection, so
accessing it crashes the process.

Some injected DLLs read the whole memory space dedicated to the xul.dll
image to search for patterns in it. When they hit the .retplne section,
we will crash. This happened for a legit product in bug 1837242, but
also for a malicious DLL in bug 1841751. This is a startup crash.

This changeset blocks the variants of this malicious DLL we know, to
eliminate the associated startup crash spike. Because the DLL does not
use a fixed name, we block by matching on the combination of version
number + timestamp + image size, based on the values found in crash
reports. We additionnally check for a checksum of 0 and the absence of
debug information, both of which are uncommon for legit production-ready
DLLs; this thus helps further reduce the chances of collision.

Differential Revision: https://phabricator.services.mozilla.com/D183096
2023-07-10 13:59:16 +00:00
Yannis Juglaret ba95c8eabd Bug 1733532 - New attempt to avoid using stack buffers during calls to Thread32Next. r=gstoll
The previous attempt at avoiding the crash from bug 1733532 resulted in
breaking DLL blocklist code on older versions of Windows, in particular
Windows 7, which led to a crash spike (see bug 1837242).

The detect executable DLL mappings, we must not look at the protection
asked in the arguments of NtMapViewOfSection, but rather at the
protection that was used to create the section. We already do this
through NtQueryVirtualMemory, but in a helper function rather than
directly in patched_NtMapViewOfSection.

Because the helper function does not have MOZ_NO_STACK_PROTECTOR, it
does not avoid stack cookie checks when NtMapViewOfSection is called
from Thread32Next. To mitigate the crash from bug 1733532, we need to
move the call to NtQueryVirtualMemory to the main patched function, at
the (reasonable) cost of losing the stack cookie check on local
variable mbi since this function has MOZ_NO_STACK_PROTECTOR.

Differential Revision: https://phabricator.services.mozilla.com/D182982
2023-07-07 15:40:28 +00:00
Yannis Juglaret c1236bb03f Bug 1837242 - Fix the DLL blocklist code for older versions of Windows. r=gstoll
While fixing a crash in bug 1733532, we accidentally broke the DLL
blocklist on older versions of Windows (Windows 7, some versions
of Windows 10, and possibly Windows 8 and 8.1). This is currently
preventing us from mitigating crashes with third-party injected DLLs, in
particular the crash incident from bug 1837242. Considering the volumes
involved, let's temporarily reintroduce bug 1733532 to ensure everyone
has a working blocklist, and deal with bug 1733532 later.

Differential Revision: https://phabricator.services.mozilla.com/D182917
2023-07-06 17:03:34 +00:00
Greg Stoll 8a94278667 Bug 1835926 - allow multiple blocklist flags r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D180722
2023-06-13 12:16:30 +00:00
Andrew Osmond 9e9636787c Bug 1830950 - Block various anti-virus DLLs in GMP processes. r=gstoll
Similar to the utility process in bug 1826393, we are seeing
crashes in the plugin process due to certain anti-virus apps such
as Symantec. This causes us to fail to load the Widevine plugin
with ERROR_MOD_NOT_FOUND.

This patch adds support to add blocklist entries for the GMPlugin
process type, and mirrors the entries added for the utility
process. It also adds a test case to verify the blocklist
integration.

Differential Revision: https://phabricator.services.mozilla.com/D176942
2023-05-02 20:51:47 +00:00
Norisz Fay cfe93c002a Backed out changeset 82b9dcbe0f17 (bug 1830950) for causing build bustages CLOSED TREE 2023-05-02 22:50:59 +03:00
Andrew Osmond ba0d08b4b9 Bug 1830950 - Block various anti-virus DLLs in GMP processes. r=gstoll
Similar to the utility process in bug 1826393, we are seeing
crashes in the plugin process due to certain anti-virus apps such
as Symantec. This causes us to fail to load the Widevine plugin
with ERROR_MOD_NOT_FOUND.

This patch adds support to add blocklist entries for the GMPlugin
process type, and mirrors the entries added for the utility
process. It also adds a test case to verify the blocklist
integration.

Differential Revision: https://phabricator.services.mozilla.com/D176942
2023-05-02 19:31:01 +00:00
Greg Stoll 68a7a843d8 Bug 1828143 - allow multiple blocklist entries for the same DLL name r=handyman
I did a little bit of refactoring in the mozglue blocklist to make this change cleaner.

The [existing gtests/cppunittests pass](https://treeherder.mozilla.org/jobs?repo=try&revision=a2a946b3d4773d93b90b32eb80308460061458a7), and I also ran the TestDllBlocklist* gtests against the mozglue blocklist by messing with registry entries to disable the launcher process. These tests pass, except for the few that always fail. (for example, TestDllBlocklist_UserBlocked)

Differential Revision: https://phabricator.services.mozilla.com/D175575
2023-04-21 18:35:42 +00:00
serge-sans-paille 45901a24b9 Bug 1828382 - Make browser/app/winlauncher/freestanding buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D175595
2023-04-18 13:43:19 +00:00
Yannis Juglaret 205f22ec5d Bug 1819064 - Enforce no stack cookie instrumentation in patched_NtMapViewOfSection. r=gstoll
Bug 1733532 introduced a debug-only assertion so that we have failing
gtests if we unintentionnally reintroduce stack buffers in
patched_NtMapViewOfFile. This is important to make the patch from bug
1733532 futureproof.

This helped us realize that the function currently gets a stack cookie
check in non-optimized builds. We can prevent this by enforcing the
absence of stack cookie checks in patched_NtMapViewOfFile with a new
function attribute MOZ_NO_STACK_PROTECTOR.

Differential Revision: https://phabricator.services.mozilla.com/D171362
2023-03-03 15:07:50 +00:00
Yannis Juglaret 6a8f812670 Bug 1733532 - Avoid using stack buffers during calls to Thread32Next. r=gstoll
Thread32Next relies on NtMapViewOfSection to map the snapshot that it works with.
We hook NtMapViewOfSection, so calls to Thread32Next reach our patched_NtMapViewOfSection.

With some third-party software, this results in a crash if we use stack buffers (see bug 1733532),
because for some reason the stack cookie check code is not mapped executable. If we can avoid using
stack buffers in that case, then the third-party DLL should get its result from NtMapViewOfSection
without error.

This change thus splits patched_NtMapViewOfSection so that we only use stack buffers when necessary,
i.e. when an executable mapping is asked. Hopefully this can fix bug 1733532.

Differential Revision: https://phabricator.services.mozilla.com/D169450
2023-02-24 15:43:51 +00:00
Greg Stoll ff17c98af6 Bug 1811590 - always calculate whether a module is dependent r=yjuglaret
A few changes here:
- rename IsDependentModule() to IsInjectedDependentModule(), as that's closer to what it does (and confused me when I was reading this code)
- Move the `#if defined(EARLY_BETA_OR_EARLIER)` out to the calling function so that we always correctly calculate whether a module is dependent, and change it to NIGHTLY_BUILD re bug 1806041
- Since we're now always detecting whether a module is dependent, it seems like a good idea if we were going to be blocking it to make it NoOpEntryPoint even if we're not NIGHTLY_BUILD. This will help if a user adds such a DLL to the dynamic blocklist; I think if that were to happen right now Firefox would crash on launch?

Differential Revision: https://phabricator.services.mozilla.com/D167454
2023-01-27 03:16:12 +00:00
Sandor Molnar 6be52ed1d4 Backed out changeset bb54c4f03d8a (bug 1811590) for causing build bustage in browser/app/winlauncher/freestanding/DllBlocklist.cpp CLOSED TREE 2023-01-27 00:07:24 +02:00
Greg Stoll cbf487e278 Bug 1811590 - always calculate whether a module is dependent r=yjuglaret
A few changes here:
- rename IsDependentModule() to IsInjectedDependentModule(), as that's closer to what it does (and confused me when I was reading this code)
- Move the `#if defined(EARLY_BETA_OR_EARLIER)` out to the calling function so that we always correctly calculate whether a module is dependent, and change it to NIGHTLY_BUILD re bug 1806041
- Since we're now always detecting whether a module is dependent, it seems like a good idea if we were going to be blocking it to make it NoOpEntryPoint even if we're not NIGHTLY_BUILD. This will help if a user adds such a DLL to the dynamic blocklist; I think if that were to happen right now Firefox would crash on launch?

Differential Revision: https://phabricator.services.mozilla.com/D167454
2023-01-26 21:10:28 +00:00
Greg Stoll 62e5d740ae Bug 1804023 - Part 2: add ability to blocklist DLLs in just the GPU process r=gsvelto
As with the socket process, we can't automated test that the block works in the GPU process, but I manually verified this. I did add an automated test that ensures blocking something in the GPU process doesn't block it in other processes.

Differential Revision: https://phabricator.services.mozilla.com/D167399
2023-01-20 19:21:39 +00:00
Greg Stoll def9d948d3 Bug 1804023 - Part 1: make blocklisting initialization take process type instead of a series of booleans r=gsvelto
This is just refactoring in preparation for the next patches

Differential Revision: https://phabricator.services.mozilla.com/D167398
2023-01-20 19:21:39 +00:00
Cosmin Sabou af47c3669b Backed out 3 changesets (bug 1804023) for causing DllBlocklistInit.cpp related bustages. CLOSED TREE
Backed out changeset 8ac7bb069839 (bug 1804023)
Backed out changeset 9d2766a3d506 (bug 1804023)
Backed out changeset b5b4be5f7502 (bug 1804023)
2023-01-20 20:44:28 +02:00
Greg Stoll 8cb4d0d627 Bug 1804023 - Part 2: add ability to blocklist DLLs in just the GPU process r=gsvelto
As with the socket process, we can't automated test that the block works in the GPU process, but I manually verified this. I did add an automated test that ensures blocking something in the GPU process doesn't block it in other processes.

Differential Revision: https://phabricator.services.mozilla.com/D167399
2023-01-20 18:00:45 +00:00
Greg Stoll 411596c0a6 Bug 1804023 - Part 1: make blocklisting initialization take process type instead of a series of booleans r=gsvelto
This is just refactoring in preparation for the next patches

Differential Revision: https://phabricator.services.mozilla.com/D167398
2023-01-20 18:00:45 +00:00
Greg Stoll 8bda354b80 Bug 1808126 - fix --disable-updater build r=yjuglaret
Differential Revision: https://phabricator.services.mozilla.com/D165783
2023-01-05 12:39:51 +00:00
Greg Stoll 59ddd36b1c Bug 1744362 - Part 13: special-case loading kernel32.dll to avoid crashes r=handyman
The comment mostly explains it. I don't understand why this only happens on PGO builds, but it's 100% reproducible on try builds and the fix seems reasonable enough.

Depends on D165561

Differential Revision: https://phabricator.services.mozilla.com/D165724
2022-12-30 20:10:07 +00:00
Greg Stoll bd687d3319 Bug 1744362 - Part 12: fix build and some tests r=handyman
- In sandboxBroker.cpp Be more careful about checking whether GetDependentModules() is returning an empty span to avoid ASAN problems
- In TestCrossProcessWin.cpp, make UniquePtr live as long as the Span that wraps it
- In LauncherRegistryInfo, mingw doesn't allow using `constexpr` with expressions containing '|', so just make flags `const` instead.

Differential Revision: https://phabricator.services.mozilla.com/D165561
2022-12-30 20:10:06 +00:00
Greg Stoll e36615748c Bug 1744362 - Part 11: make dynamic blocklist work on DLLs that load before kernel32 r=handyman
Two of the three DLLs that Avast injects into Firefox were not properly being blocked when on the dynamic blocklist because they were being loaded before kernel32.dll, and SharedSection::Layout::Resolve() would fail. For the dynamic blocklist part of things we don't actually need the kernel32 exports, so this change moves them to the end of Resolve() and adds an intermediate state where the dynamic blocklist entries have been loaded but not the kernel32 exports. Now all three DLLs can be blocked correctly when on the dynamic blocklist.

Differential Revision: https://phabricator.services.mozilla.com/D164738
2022-12-30 20:10:06 +00:00
Greg Stoll 2b461b0360 Bug 1744362 - Part 7: support code for about:third-party r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D164489
2022-12-30 20:10:04 +00:00
Greg Stoll ae13a56ab0 Bug 1744362 - Part 6: use dynamic blocklist file to block third-party DLLs r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D164488
2022-12-30 20:10:04 +00:00
Toshihito Kikuchi 61206c170d Bug 1744362 - Part 5: Access the shared section through DllServices r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D164487
2022-12-30 20:10:03 +00:00
Toshihito Kikuchi c96ab58894 Bug 1744362 - Part 4: Move mState from Kernel32ExportsSolver to Layout r=handyman
This is a refactoring that makes SharedSection::Reset() do the resolving of Kernel32ExportsSolver. This will allow us in a future patch to let the SharedSection attempt to resolve Kernel32ExportsSolver multiple times, as it will fail if kernel32.dll isn't loaded in the process yet, but we still want to initialize the dynamic blocklist in that case.

Differential Revision: https://phabricator.services.mozilla.com/D164486
2022-12-30 20:10:03 +00:00
Toshihito Kikuchi 99110bd166 Bug 1744362 - Part 3: Hide SharedSection::Layout r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D164485
2022-12-30 20:10:02 +00:00
Toshihito Kikuchi 48ba520471 Bug 1744362 - Part 2: Minor fixes r=handyman
- AddString should check .Length instead of .MaximumLength
- SharedSection::Init does not have to take PEHeaders
- Improve the boundary check in SharedSection::AddDependentModule
- Use MOZ_LITERAL_UNICODE_STRING in Kernel32ExportsSolver::ResolveInternal
- Use SharedSection::ConvertToReadOnly in TestCrossProcessWin
- Use SharedSection::Reset to close the handle in TestCrossProcessWin
- Typo: s/AddDepenentModule/AddDependentModule/
- TestCrossProcessWin should compare leaf names

Differential Revision: https://phabricator.services.mozilla.com/D164484
2022-12-30 20:10:02 +00:00
Butkovits Atila 5e31c1c2cf Backed out 12 changesets (bug 1744362) for causing build bustages.
Backed out changeset 3f63f21115e2 (bug 1744362)
Backed out changeset 0df403e8f6ba (bug 1744362)
Backed out changeset 34f51e6aee96 (bug 1744362)
Backed out changeset 39ff51df4a45 (bug 1744362)
Backed out changeset da9133df4cd4 (bug 1744362)
Backed out changeset 315c57948afa (bug 1744362)
Backed out changeset a2d8f526e0ff (bug 1744362)
Backed out changeset 401ebbc0159d (bug 1744362)
Backed out changeset 2911fe484cc3 (bug 1744362)
Backed out changeset d1f4b99f352b (bug 1744362)
Backed out changeset 0a3ce8ea039e (bug 1744362)
Backed out changeset ab1292118c00 (bug 1744362)
2022-12-27 22:54:30 +02:00