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

7092 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell d65dcbe321 Bug 1743020 - Part 4: Use MoveOnlyFunction in DataPipe, r=ipc-reviewers,mccr8
This is mostly a simple use-case for the type which I was aware of and
could use to ensure it builds correctly.

Differential Revision: https://phabricator.services.mozilla.com/D145692
2022-06-02 13:24:10 +00:00
Nika Layzell fc7c1048de Bug 1771234 - Make it easier to use a specific serial event target when binding an actor, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D147381
2022-06-01 14:35:16 +00:00
James Teh 8cda799e04 Bug 1756728 part 3: Remove now unused PDocAccessible::URL. r=morgan,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D147718
2022-06-01 00:34:18 +00:00
Alexandre Lissy da51fede3d Bug 1771416 - Disable utility audio tests on Android Isolated Process r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D147491
2022-05-27 19:08:48 +00:00
Alexandre Lissy 35c2287eb6 Bug 1767930 - Test for Utility AudioDecoder on Android r=alwu,jolin
Differential Revision: https://phabricator.services.mozilla.com/D145896
2022-05-26 23:00:08 +00:00
Alexandre Lissy c53de97817 Bug 1767930 - Enable Utility AudioDecoder for Android r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D145785
2022-05-26 23:00:07 +00:00
Nika Layzell d32f90fe46 Bug 1769593 - Part 2: Improve reporting of fatal DataPipe (de)serialization errors, r=jld
Depends on D146501

Differential Revision: https://phabricator.services.mozilla.com/D146502
2022-05-26 20:16:09 +00:00
Nika Layzell cefa79c10e Bug 1769593 - Part 1: Fail when serializing file handles in excess of MAX_DESCRIPTORS_PER_MESSAGE, r=jld
Differential Revision: https://phabricator.services.mozilla.com/D146501
2022-05-26 20:16:09 +00:00
Alexandre Lissy ed32e3d443 Bug 1770241 - Move SetThisProcessName() to avoid risky GetCurrentProcess() r=haik
Differential Revision: https://phabricator.services.mozilla.com/D146964
2022-05-25 20:59:32 +00:00
Nika Layzell 36b38fb3c0 Bug 1767514 - Part 3: Retry sending fds if sendmsg fails, r=ipc-reviewers,jld
Before this change, we wouldn't re-try sending fds if the first attempt
to send them failed, meaning that some fds wouldn't arrive if there was
any error sending (e.g. because the send buffer was full, which
is more common on macOS).

This new approach ensures we don't record that we've sent the fds until
the message is marked as successful, and should avoid the macOS errors.

Depends on D145392

Differential Revision: https://phabricator.services.mozilla.com/D146621
2022-05-24 14:41:11 +00:00
Nika Layzell 39f1df8386 Bug 1767514 - Part 2: Increase the attached handle limit for IPC Messages, r=ipc-reviewers,jld
This is made possible by part 1, which made it possible to send more messages
using IPC::Channel. A limit is still in place, however it is now substantially
higher, hopefully making it effectively unlimited for practical purposes.

Differential Revision: https://phabricator.services.mozilla.com/D145392
2022-05-24 14:41:10 +00:00
Nika Layzell 2a7c5cf9a5 Bug 1767514 - Part 1: Decouple the IPC::Message max handle count and the number of FDs supported by IPC::Channel, r=ipc-reviewers,jld
This is done by splitting messages with large numbers of handles into multiple
`sendmsg` calls, each of which contains less than the maximum number of
transferred handles per-message, and stitching the message back together on the
receiving side. Most of the work on the receiving side was already handled by
the IPC::Channel code, so the work required was only to ensure we could split
the handle list up when sending.

Differential Revision: https://phabricator.services.mozilla.com/D145391
2022-05-24 14:41:10 +00:00
Jan Varga ba2d77a450 Bug 1759993 - QM: Introduce QM_IPC_FAIL macro; r=ipc-reviewers,mccr8,hsingh
Differential Revision: https://phabricator.services.mozilla.com/D141336
2022-05-24 14:39:13 +00:00
Tim Huang bebf6a1109 Bug 1768193 - Part 1: Use maybe to hold mIsThirdPartyContextToTopWindow in LoadInfo. r=anti-tracking-reviewers,necko-reviewers,bvandersloot,kershaw
In order to know if the mIsThirdPartyContextToTopWindow was set in the
loadInfo of the channel, we use maybe to hold the value. So, we can know
if it was set before.

This patch also addes two methods in LoadInfo to clear and know if the
value is set.

Differential Revision: https://phabricator.services.mozilla.com/D146491
2022-05-24 08:17:28 +00:00
Bob Owen b48aea26d9 Bug 1769845 p1: Use command line to pass whether win32k is locked down in policy. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D146930
2022-05-23 07:53:41 +00:00
Chris Martin 0549e90cbb Bug 1769807 - Ensure Win32k state initialized before content launch. r=nalexander
Win32k Lockdown state must be initialized on the main thread, but currently
a process launcher may be the first thing to read it on the IPC Thread

Initializing Win32k Lockdown state also relies on the gfxPlatform being
initialized, but that also isn't explicit anywhere.

This patch ensures both things are true: Always ensure that Win32k State is
initialized before queuing a process launch to the IPC Thread, and always
ensure that gfxPlatform is initialized before attempting to read the
gfx state.

Differential Revision: https://phabricator.services.mozilla.com/D146821
2022-05-20 20:55:05 +00:00
Cristian Tuns b9179e443b Backed out changeset 9dc2f0c648e4 (bug 1769807) for causing mochitest failures on browser_xpcom_graph_wait.js CLOSED TREE 2022-05-20 14:01:26 -04:00
Chris Martin 4ef19ac392 Bug 1769807 - Ensure Win32k state initialized before content launch r=bobowen,nalexander
Win32k Lockdown state must be initialized on the main thread, but currently
a process launcher may be the first thing to read it on the IPC Thread

Initializing Win32k Lockdown state also relies on the gfxPlatform being
initialized, but that also isn't explicit anywhere.

This patch ensures both things are true: Always ensure that Win32k State is
initialized before queuing a process launch to the IPC Thread, and always
ensure that gfxPlatform is initialized before attempting to read the
gfx state.

Differential Revision: https://phabricator.services.mozilla.com/D146821
2022-05-20 17:12:36 +00:00
Alexandre Lissy cd689b44aa Bug 1769033 - Add OpenBSD sandboxing support r=gaston
Differential Revision: https://phabricator.services.mozilla.com/D146568
2022-05-20 08:25:04 +00:00
Alexandre Lissy 2455fdcc08 Bug 1769624 - Verify shutdown status before asserting r=nika
Differential Revision: https://phabricator.services.mozilla.com/D146567
2022-05-19 23:50:57 +00:00
Marian-Vasile Laza 17f3ff6ecd Backed out changeset 0afbb1e34fe3 (bug 1769807) for causing bc failures on browser_xpcom_graph_wait.js. CLOSED TREE 2022-05-19 22:41:30 +03:00
Jed Davis 73a294a2b8 Bug 1769182 - Allow the RDD process to use EGL under X11 on Linux. r=gcp
This patch mostly turns on the features set up by the earlier patches:
allow connecting to the X server and reading various related things
(.Xauthority, GPU device info in sysfs, etc.).  It also turns off Mesa's
shader cache in the RDD process; that shouldn't be needed here, and
disabling it lets us avoid dealing with a few things in the sandbox
policy that we'd rather not (e.g., `getpwuid`).

Differential Revision: https://phabricator.services.mozilla.com/D146275
2022-05-19 17:02:33 +00:00
Chris Martin 2990ca00d8 Bug 1769807 - Ensure Win32k state initialized before content launch r=bobowen
Win32k Lockdown state must be initialized on the main thread, but currently
a process launcher may be the first thing to read it on the IPC Thread

Initializing Win32k Lockdown state also relies on the gfxPlatform being
initialized, but that also isn't explicit anywhere.

This patch ensures both things are true: Always ensure that Win32k State is
initialized before queuing a process launch to the IPC Thread, and always
ensure that gfxPlatform is initialized before attempting to read the
gfx state.

Differential Revision: https://phabricator.services.mozilla.com/D146821
2022-05-19 15:51:12 +00:00
Butkovits Atila 160c12d050 Backed out changeset 7b69c225f7c7 (bug 1769624) because the patch is not ready yet. CLOSED TREE 2022-05-18 01:40:17 +03:00
Alexandre Lissy 9ba8c615d5 Bug 1769624 - Verify shutdown status before asserting r=nika
Differential Revision: https://phabricator.services.mozilla.com/D146567
2022-05-17 20:44:24 +00:00
Andrew McCreight fa8bfd1245 Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D146457
2022-05-17 20:24:19 +00:00
Alexandre Lissy 2be35f16d6 Bug 1769547 - Do not MOZ_CRASH() on missing process r=nika
Differential Revision: https://phabricator.services.mozilla.com/D146462
2022-05-16 17:02:44 +00:00
Alexandre Lissy 6330ec5e08 Bug 1767582 - Enable Utility AudioDecoder on Nightly r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D145584
2022-05-16 11:07:26 +00:00
Molnar Sandor 74e42d0f2f Backed out 5 changesets (bug 1743020) for causing linux build bustages in function2.hpp CLOSED TREE
Backed out changeset cf237471cf75 (bug 1743020)
Backed out changeset 78eb51447ce5 (bug 1743020)
Backed out changeset c486f95d55ec (bug 1743020)
Backed out changeset c0abfda55404 (bug 1743020)
Backed out changeset 16be18ca73fb (bug 1743020)
2022-05-14 10:31:12 +03:00
Iulian Moraru cf3fad08ff Backed out 5 changesets (bug 1769182) for causing mochitest failures on browser_sandbox_test.js. CLOSED TREE
Backed out changeset f5b71a28f28b (bug 1769182)
Backed out changeset 7a64faec004f (bug 1769182)
Backed out changeset c7833370362a (bug 1769182)
Backed out changeset b91adae9bb59 (bug 1769182)
Backed out changeset cf7bb9b7414d (bug 1769182)
2022-05-14 05:20:37 +03:00
Jed Davis accee09e1b Bug 1769182 - Allow the RDD process to use EGL under X11 on Linux. r=gcp
This patch mostly turns on the features set up by the earlier patches:
allow connecting to the X server and reading various related things
(.Xauthority, GPU device info in sysfs, etc.).  It also turns off Mesa's
shader cache in the RDD process; that shouldn't be needed here, and
disabling it lets us avoid dealing with a few things in the sandbox
policy that we'd rather not (e.g., `getpwuid`).

Differential Revision: https://phabricator.services.mozilla.com/D146275
2022-05-14 00:42:56 +00:00
Nika Layzell a035fb975b Bug 1743020 - Part 4: Use MoveOnlyFunction in DataPipe, r=ipc-reviewers,mccr8
This is mostly a simple use-case for the type which I was aware of and
could use to ensure it builds correctly.

Differential Revision: https://phabricator.services.mozilla.com/D145692
2022-05-13 23:43:53 +00:00
Alexandre Lissy dbf185ac34 Bug 1768411 - Test Utility AudioDecoder crash recovery r=alwu,nika
Differential Revision: https://phabricator.services.mozilla.com/D146100
2022-05-13 18:47:28 +00:00
Nika Layzell 1aa11ffed6 Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-13 14:16:13 +00:00
Nika Layzell 4c0787e66e Bug 1754004 - Part 6: Preserve MIME information when serializing a lazy stream, r=asuth,necko-reviewers,dragana
the nsIMIMEInputStream type contains extra metadata header information
which shouldn't be lost when serializing the type over IPC. This patch
changes the LazyStream serialization to take this into account and only
serialize the value within the nsMIMEInputStream when sending a lazy
stream over IPC.

This information is specifically used by HTTP channels in order to
populate POST request headers.

Differential Revision: https://phabricator.services.mozilla.com/D141043
2022-05-13 14:16:11 +00:00
Nika Layzell 95a883d65d Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-13 14:16:10 +00:00
Nika Layzell 2b307c5cea Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-13 14:16:09 +00:00
Nika Layzell ef3794b3c5 Bug 1754004 - Part 1: Switch IPCStream to use DataPipe instead of P{ChildToParent,ParentToChild}Stream, r=asuth,necko-reviewers,kershaw
This gives us various positive benefits, such as using a shared memory ring
buffer for faster communication, not having data streaming being bound to the
thread which transferred the nsIInputStream (which is often the main thread),
and the ability for some backpressure to be applied to data streaming.

After this change, the "delayed start" parameter for IPCStream serialization is
less relevant, as backpressure will serve a similar purpose. It will still be
used to determine whether or not to use RemoteLazyInputStream when serializing
from the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D141038
2022-05-13 14:16:09 +00:00
Nika Layzell 7fb91b57a3 Bug 1759563 - Add SerializedComplexity to limit the complexity of serialized IPCStream instances, r=asuth,necko-reviewers,dragana
This will improve the efficiency of serializing large data pipes, which in bad
cases can end up serializing very small amounts of data in individual pipes
over IPC, and acts as a compliment to the existing logic for limiting
serialized message sizes. It is also necessary for the changes in bug 1754004,
which require the ability to include FileDescriptor inline in the message,
which could blow out our FileDescriptor count limits if pipe creation was
unlimited.

In some tests, this change reduces the number of pipes required to serialize a
nsIInputStream from over 5000 to 1.

Differential Revision: https://phabricator.services.mozilla.com/D141036
2022-05-13 14:16:08 +00:00
Nika Layzell b8bbcfbc33 Bug 1769124 - Require Recv methods to return IPCResult, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D146243
2022-05-13 02:20:23 +00:00
Nika Layzell 730bd0605c Bug 1768956 - Allow canceling AsyncWait callbacks in DataPipe, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D146129
2022-05-12 15:35:48 +00:00
Alexandre Lissy 16e4ebbd58 Bug 1768696 - Correct start/stop Utility Process test logic r=nika
Differential Revision: https://phabricator.services.mozilla.com/D146067
2022-05-11 22:52:25 +00:00
Alexandre Lissy e52065148a Bug 1768696 - Unregister correct memory reporter on UtilityProcessParent r=nika
Differential Revision: https://phabricator.services.mozilla.com/D146066
2022-05-11 22:52:25 +00:00
Nika Layzell 9f2d7d7379 Bug 1768775 - Stash mIsFuzzMsg on the MessageTask so it's available after the message is run, r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D146082
2022-05-11 14:15:35 +00:00
Bogdan Szekely b72e9d7d63 Merge autoland to mozilla-central. a=merge 2022-05-11 12:41:39 +03:00
Noemi Erli 45276205df Backed out 22 changesets (bug 1696894, bug 1759569, bug 1754031, bug 1759563, bug 1759572, bug 1754004) for causing leack failures CLOSED TREE
Backed out changeset 673ecd5337e1 (bug 1754004)
Backed out changeset ecbf5f3c51de (bug 1754004)
Backed out changeset fc6c39f56d21 (bug 1754004)
Backed out changeset 5b3d58fbaf9d (bug 1696894)
Backed out changeset 2e56c89cf55d (bug 1754004)
Backed out changeset b7723490f025 (bug 1754004)
Backed out changeset 1dfbf61ff5dd (bug 1754004)
Backed out changeset e73abb071bb3 (bug 1754004)
Backed out changeset f9abe4fbf501 (bug 1754004)
Backed out changeset ee7aeb631cd9 (bug 1754004)
Backed out changeset d66aacfcf983 (bug 1754004)
Backed out changeset 5c2872ad6912 (bug 1754004)
Backed out changeset e1ae48f30d2c (bug 1754004)
Backed out changeset 849b63707d7f (bug 1754004)
Backed out changeset 36563e3b1e04 (bug 1754004)
Backed out changeset ccb4be659107 (bug 1754004)
Backed out changeset 659581d4159b (bug 1754004)
Backed out changeset 611ea76d7a9c (bug 1754004)
Backed out changeset 9b24b561698c (bug 1759572)
Backed out changeset f820e0f209ff (bug 1759563)
Backed out changeset 8d82066fa181 (bug 1759569)
Backed out changeset a2835afab1ad (bug 1754031)
2022-05-11 06:16:25 +03:00
Nika Layzell dc7ecdeb22 Bug 1768476 - Part 3: Fix nyx-fuzz only bustage on a CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D146026
2022-05-11 00:59:15 +00:00
Nika Layzell 024c6e0c0a Bug 1754004 - Part 11: Simplify the IPCStream serialization API, r=asuth,necko-reviewers,kershaw
As serializing IPCStream no longer requires a manager or FileDescriptor array,
the arguments are no longer necessary, and can be removed. The AutoIPCStream
helper can also be removed, as managed actors are no longer used for
serialization, so a delayed start callback is not necessary.

The delayed start parameter is also removed from nsIIPCSerializableInputStream
instances, but is still present as `aAllowLazy` on the toplevel serialization
methods.

Differential Revision: https://phabricator.services.mozilla.com/D141048
2022-05-10 22:27:46 +00:00
Nika Layzell 212b25425c Bug 1754004 - Part 6: Preserve MIME information when serializing a lazy stream, r=asuth,necko-reviewers,dragana
the nsIMIMEInputStream type contains extra metadata header information
which shouldn't be lost when serializing the type over IPC. This patch
changes the LazyStream serialization to take this into account and only
serialize the value within the nsMIMEInputStream when sending a lazy
stream over IPC.

This information is specifically used by HTTP channels in order to
populate POST request headers.

Differential Revision: https://phabricator.services.mozilla.com/D141043
2022-05-10 22:27:44 +00:00
Nika Layzell 76cdaba44a Bug 1754004 - Part 3: Move RemoteLazyInputStream to its own toplevel protocol, r=asuth,necko-reviewers,dragana
This is a complete rewrite of RemoteLazyInputStream to run off of its own
toplevel protocol, rather than being managed by other protocols like
PBackground or PContent. This should improve performance thanks to no longer
needing to operate on a main or worker thread, and due to no longer needing the
migration step for the stream actor.

This also acts as a step towards no longer requiring a manager actor to
serialize input streams, as the type is now actor-agnostic, and should support
being sent over IPC between any pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D141040
2022-05-10 22:27:42 +00:00