Commit Graph

6730 Commits

Author SHA1 Message Date
Christian Holler
10e7a4bf6d Bug 1742770 - Properly validate URI for null principals. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D132078
2021-11-24 20:57:29 +00:00
Nika Layzell
acedd82927 Bug 1734739 - Part 3: Stop providing pids in places where it's not needed/used, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128220
2021-11-24 17:56:01 +00:00
Nika Layzell
c8c4669312 Bug 1734739 - Part 2: Stop requiring the OtherPid to create Endpoint, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128219
2021-11-24 17:56:00 +00:00
Nika Layzell
26555d958a Bug 1734739 - Part 1: Stop requiring otherpid for ShareTo, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128218
2021-11-24 17:56:00 +00:00
Nika Layzell
97b5060ecd Bug 1734735 - Part 8: Remove the now-unused old mach_ipc_mac code, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128217
2021-11-23 16:15:23 +00:00
Nika Layzell
54f46c1714 Bug 1734735 - Part 7: Remove all SharedMemoryBasic special messaging code, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128216
2021-11-23 16:15:23 +00:00
Nika Layzell
e8759da1c8 Bug 1734735 - Part 6: Remove dead TextureSync code, r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D128215
2021-11-23 16:15:22 +00:00
Nika Layzell
f6598b1f3c Bug 1734735 - Part 5: Convert SharedMemoryBasic_mach to use relayed mach ports, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128214
2021-11-23 16:15:22 +00:00
Nika Layzell
242fc0f7d7 Bug 1734735 - Part 4: Support relaying mach ports via the parent process, r=handyman,mstange
Differential Revision: https://phabricator.services.mozilla.com/D128213
2021-11-23 16:15:21 +00:00
Nika Layzell
16985051ce Bug 1734735 - Part 3: Generalize IPC message footer writing code, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128212
2021-11-23 16:15:21 +00:00
Alexandre Lissy
a9b9bae961 Bug 1726804 - Refactor PROCESS_TYPE_* from nsICrashService r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D121389
2021-11-19 14:02:56 +00:00
Alexandre Lissy
60d10601bb Bug 1726804 - Refactor definition and usage of GECKO_PROCESS_TYPE() r=nika,firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D121388
2021-11-19 14:02:55 +00:00
Alexandru Michis
2cb5b32d02 Backed out 2 changesets (bug 1726804) for causing sm bustages in geckoprocesstypes.
CLOSED TREE

Backed out changeset bf7f73fd1921 (bug 1726804)
Backed out changeset c9936f7534cb (bug 1726804)
2021-11-19 11:40:59 +02:00
Alexandre Lissy
882ec7bc7a Bug 1726804 - Refactor PROCESS_TYPE_* from nsICrashService r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D121389
2021-11-19 08:33:43 +00:00
Alexandre Lissy
b71c7b7255 Bug 1726804 - Refactor definition and usage of GECKO_PROCESS_TYPE() r=nika,firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D121388
2021-11-19 08:33:42 +00:00
Nika Layzell
ab32545d5a Bug 1741152 - Add diagnostic warnings to process launch codepaths, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D131419
2021-11-17 22:19:13 +00:00
Andrew McCreight
484cac8a89 Bug 1707642 - Increase message size limit in fuzzing builds. r=ipc-reviewers,nika
If the limit is small, then the fuzzers hit crashes in various places when
passing in large data structures to DOM APIs, so increase the limit.

Differential Revision: https://phabricator.services.mozilla.com/D130890
2021-11-11 18:00:02 +00:00
Andrew McCreight
5c16837860 Bug 1740529 - Log the PID of the process we're waiting on in WillDestroyCurrentMessageLoop(). r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D130889
2021-11-11 00:19:20 +00:00
Marian-Vasile Laza
133cd29435 Backed out 2 changesets (bug 1712837) for causing mochitest and marionette test failures. CLOSED TREE
Backed out changeset ecfd23a7ef69 (bug 1712837)
Backed out changeset 51529cb4682e (bug 1712837)
2021-11-11 01:52:57 +02:00
Dana Keeler
15ebcb5e82 Bug 1712837 - introduce ipcclientcerts to allow client certificates to work with the socket process r=rmf,kershaw,necko-reviewers,ipc-reviewers,nika
This patch introduces ipcclientcerts, a PKCS#11 module that the socket process
can load to get access to client certificates and keys managed by the parent
process. This enables client certificate authentication to work with the socket
process (particularly for keys stored outside of NSS, as with osclientcerts or
third-party PKCS#11 modules).

Differential Revision: https://phabricator.services.mozilla.com/D122392
2021-11-10 21:48:47 +00:00
Nika Layzell
0d9a71dc85 Bug 1740596 - Include more details in IPDL warnings, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D130923
2021-11-10 21:48:22 +00:00
Marian-Vasile Laza
948f23ed24 Backed out changeset c667e28154b6 (bug 1707642) for causing build bustages on MessageLink.cpp. CLOSED TREES 2021-11-10 22:26:37 +02:00
Andrew McCreight
75a68d0785 Bug 1707642 - Increase message size limit in fuzzing builds. r=ipc-reviewers,nika
If the limit is small, then the fuzzers hit crashes in various places when
passing in large data structures to DOM APIs, so increase the limit.

Differential Revision: https://phabricator.services.mozilla.com/D130890
2021-11-10 17:59:24 +00:00
Nika Layzell
713c899320 Bug 1732343 - Part 10: Remove the now-unused ipc::DuplicateHandle, r=handyman
This should unblock removing support for BrokerDuplicateHandle from our fork of
the chromium sandboxing code.

Differential Revision: https://phabricator.services.mozilla.com/D126572
2021-11-09 14:17:35 +00:00
Nika Layzell
f3e5fa0fee Bug 1732343 - Part 7: Use attached handles for Windows CrossProcess{Mutex,Semaphore} serialization, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D126569
2021-11-09 14:17:34 +00:00
Nika Layzell
71d0301a3c Bug 1732343 - Part 6: Use attached handles for Windows TransportDescriptor serialization, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D126568
2021-11-09 14:17:34 +00:00
Nika Layzell
4bf7ce347c Bug 1732343 - Part 5: Use attached handles for Windows SharedMemory serialization, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D126567
2021-11-09 14:17:33 +00:00
Nika Layzell
95cdfbabee Bug 1732343 - Part 4: Use attached handles for Windows FileDescriptor serialization, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D126566
2021-11-09 14:17:33 +00:00
Nika Layzell
429530ace6 Bug 1732343 - Part 3: Support directly attaching handles to IPC messages on windows, r=handyman
Handles which are directly attached to IPC messages will be transferred by the
parent process. This is handled either directly by the parent process (if it is
one of the participants), or by relaying the message via the parent process if
it is not. Ordering issues are avoided here thanks to support in the mojo ports
code for messages being delivered out-of-order.

The actual handle values are encoded in the message after the message payload,
and removed from the message before handing it off to existing code, so it
should be fully transparent.

In addition, a new flag is added to the message header to support marking a
message as a "relay" message, as well as support for deserializing these
messages with an extra NodeName (the real target/source) in the message footer.

Differential Revision: https://phabricator.services.mozilla.com/D126565
2021-11-09 14:17:32 +00:00
Nika Layzell
d73755617d Bug 1732343 - Part 2: Migrate all uses of base::FileDescriptor to UniqueFileHandle, r=handyman
This is useful for the following parts, as UniqueFileHandle is a cross-platform
type which can also be used to support transferring HANDLEs between processes.

This change requires fairly sweeping changes to existing callsites, which
previously did not require owning access to the handle types when transferring.
For the most part these changes were straightforward, but manual.

Differential Revision: https://phabricator.services.mozilla.com/D126564
2021-11-09 14:17:32 +00:00
Nika Layzell
803584be9d Bug 1732343 - Part 1: Better support for moveonly types in IPDL, r=handyman
In part 2 of this patch, a large number of messages are being converted to
contain move-only types, both as direct arguments and within compound data
structures. This revealed some limitations in IPDL's handling of moveonly
types, which this patch hopes to rectify. This also required changes to allow
distinguishing between types which require move to send vs. them not having a
move constructor.

This does not fully fix the underlying issues, but attempts to preserve
existing behaviour while improving support for the new types being added. There
should be further cleanup in the future.

Differential Revision: https://phabricator.services.mozilla.com/D126563
2021-11-09 14:17:31 +00:00
Cristian Tuns
cbd178830f Backed out 10 changesets (bug 1732343) for causing coverage build bustages (Bug 1739590).
Backed out changeset bba94c79f3e1 (bug 1732343)
Backed out changeset d30fa1e1f605 (bug 1732343)
Backed out changeset ed0b4f757c4b (bug 1732343)
Backed out changeset a272da134c34 (bug 1732343)
Backed out changeset ccb259d73843 (bug 1732343)
Backed out changeset a292990b62de (bug 1732343)
Backed out changeset 7d1854782ca8 (bug 1732343)
Backed out changeset 29eaabd9ffb3 (bug 1732343)
Backed out changeset 1aa26657a7a6 (bug 1732343)
Backed out changeset 7a6708dc620a (bug 1732343)
2021-11-05 07:21:04 -04:00
James Teh
b2865987fc Bug 1736742 part 2: Provide ability to register a COM handler inside an MSIX container. r=nalexander,jmathies
We could do this in HKLM using registry.dat, but that file is difficult to manage.
Instead, we register in HKCU at runtime.
Also, RegCreateKeyTransacted doesn't work in MSIX containers, so we must use RegCreateKeyEx.

Differential Revision: https://phabricator.services.mozilla.com/D129950
2021-11-05 06:25:45 +00:00
Nika Layzell
1cd9e0c087 Bug 1732343 - Part 10: Remove the now-unused ipc::DuplicateHandle, r=handyman
This should unblock removing support for BrokerDuplicateHandle from our fork of
the chromium sandboxing code.

Differential Revision: https://phabricator.services.mozilla.com/D126572
2021-11-04 19:20:21 +00:00
Nika Layzell
902aa7430e Bug 1732343 - Part 7: Use attached handles for Windows CrossProcess{Mutex,Semaphore} serialization, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D126569
2021-11-04 19:20:19 +00:00
Nika Layzell
eb3349f581 Bug 1732343 - Part 6: Use attached handles for Windows TransportDescriptor serialization, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D126568
2021-11-04 19:20:19 +00:00
Nika Layzell
fc6ef2a44a Bug 1732343 - Part 5: Use attached handles for Windows SharedMemory serialization, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D126567
2021-11-04 19:20:19 +00:00
Nika Layzell
aa3b31b0e4 Bug 1732343 - Part 4: Use attached handles for Windows FileDescriptor serialization, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D126566
2021-11-04 19:20:18 +00:00
Nika Layzell
4bd83c851e Bug 1732343 - Part 3: Support directly attaching handles to IPC messages on windows, r=handyman
Handles which are directly attached to IPC messages will be transferred by the
parent process. This is handled either directly by the parent process (if it is
one of the participants), or by relaying the message via the parent process if
it is not. Ordering issues are avoided here thanks to support in the mojo ports
code for messages being delivered out-of-order.

The actual handle values are encoded in the message after the message payload,
and removed from the message before handing it off to existing code, so it
should be fully transparent.

In addition, a new flag is added to the message header to support marking a
message as a "relay" message, as well as support for deserializing these
messages with an extra NodeName (the real target/source) in the message footer.

Differential Revision: https://phabricator.services.mozilla.com/D126565
2021-11-04 19:20:18 +00:00
Nika Layzell
b8279164db Bug 1732343 - Part 2: Migrate all uses of base::FileDescriptor to UniqueFileHandle, r=handyman
This is useful for the following parts, as UniqueFileHandle is a cross-platform
type which can also be used to support transferring HANDLEs between processes.

This change requires fairly sweeping changes to existing callsites, which
previously did not require owning access to the handle types when transferring.
For the most part these changes were straightforward, but manual.

Differential Revision: https://phabricator.services.mozilla.com/D126564
2021-11-04 19:20:17 +00:00
Nika Layzell
9f23266238 Bug 1732343 - Part 1: Better support for moveonly types in IPDL, r=handyman
In part 2 of this patch, a large number of messages are being converted to
contain move-only types, both as direct arguments and within compound data
structures. This revealed some limitations in IPDL's handling of moveonly
types, which this patch hopes to rectify. This also required changes to allow
distinguishing between types which require move to send vs. them not having a
move constructor.

This does not fully fix the underlying issues, but attempts to preserve
existing behaviour while improving support for the new types being added. There
should be further cleanup in the future.

Differential Revision: https://phabricator.services.mozilla.com/D126563
2021-11-04 19:20:17 +00:00
Dan Minor
bb596c69e6 Bug 1654112 - Add include dirs for abseil-cpp. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D130060
2020-10-26 15:19:21 -04:00
Dan Minor
38d5d300d9 Bug 1654112 - Update include paths for moved upstream code. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D130059
2020-10-23 14:02:54 -04:00
Florian Quèze
1c3f80fe51 Bug 1738285 - move AUTO_PROFILE_FOLLOWING_RUNNABLE to its own header, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D129825
2021-10-28 20:35:06 +00:00
Alexandre Lissy
4e04ec89a3 Bug 1723505 - Convert IPC processes to GeckoArgs r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D123186
2021-10-26 19:42:03 +00:00
Marian-Vasile Laza
f8576fec48 Backed out changeset fe716ee1a126 (bug 1723505) for causing build bustages. CLOSED TREE 2021-10-26 20:45:47 +03:00
Alexandre Lissy
14420a3ffc Bug 1723505 - Convert IPC processes to GeckoArgs r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D123186
2021-10-26 17:14:13 +00:00
Kagami Sascha Rosylight
b393a76883 Bug 1725942 - Part 3: Migrate LockManager implementation to PLockManager r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D125555
2021-10-19 12:01:51 +00:00
Kagami Sascha Rosylight
1b81c6c3a4 Bug 1725942 - Part 2: Add ipc::ParamTraits for dom::Sequence r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D126242
2021-10-19 12:01:50 +00:00
Nika Layzell
8d97cd8228 Bug 1725572 - Part 1: Support automatic cleanup for ManagedEndpoint instances, r=handyman
This patch adds support for ManagedEndpoint instances to be dropped &
gracefully destroyed. Before this change, a ManagedEndpoint which was
dropped without being bound would not clean up its' peer actor, meaning
that messages to and from that actor would be discarded.

This is done by adding a new actor destroy reason for dropping a
ManagedEndpoint.

Differential Revision: https://phabricator.services.mozilla.com/D128776
2021-10-18 22:59:17 +00:00