fune/ipc
Jed Davis 6c9a2c06a5 Bug 1858279 - Rework how process launch interacts with Linux sandboxing and the fork server. r=nika,gcp
Currently, process launch interfaces with Linux sandboxing via the
ForkDelegate abstraction, basically replacing `fork` with an opaque
stateful callback, configured using various info from the parent process
(prefs, gfxInfo, etc.).  Unfortunately, the fork server effectively
needs to move that object into another process, and this is accomplished
in a way that's complicated and difficult to deal with and causes some
problems.

Instead, this patch makes the sandboxing state transparent: fields
are added to LaunchOptions which are serialized/deserialized, and the
sandbox launcher object is now exposed in a header and used directly by
LaunchApp (and its fork server equivalent).

There are a few other changes that follow from this.  In particular,
the pipe for the chroot server is now created later, during LaunchApp
but before `FileDescriptorShuffle::Init`, so LaunchApp will side-effect
`LaunchOptions::fds_to_remap`.  (But this also means we're no longer
using a fake mapping of fd 10 which isn't actually used, and we're no
longer creating a socketpair in one process and sending both ends to
another process that could have just created it itself.)

For more details, see the comments in `SandboxLaunch.h` for the member
functions `Configure`, `Prepare`, and `Fork`.

As a convenient side effect of this change, `Prepare` is now fallible,
so we can handle certain error cases (like failing to create a socket
pair) more gracefully.

Differential Revision: https://phabricator.services.mozilla.com/D194456
2023-12-02 01:49:58 +00:00
..
app Bug 1850647 - add an optional argument to py_action to record the target file name for most actions, r=glandium. 2023-10-12 08:41:34 +00:00
chromium Bug 1858279 - Rework how process launch interacts with Linux sandboxing and the fork server. r=nika,gcp 2023-12-02 01:49:58 +00:00
contentproc
docs Bug 1860157 - Fix typos found by codespell 2.2.6 r=webdriver-reviewers,zeid,search-reviewers,perftest-reviewers,devtools-reviewers,releng-reviewers,gbrown,sparky,jteow 2023-10-19 20:52:10 +00:00
glue Bug 1858279 - Rework how process launch interacts with Linux sandboxing and the fork server. r=nika,gcp 2023-12-02 01:49:58 +00:00
gtest Bug 1850865: Improve MOZ_IPC_MESSAGE_LOG. r=ipc-reviewers,nika 2023-09-05 18:09:30 +00:00
ipdl Bug 1859625 Part 3: Stop sending the GetOutputColorProfileData message. r=ipc-reviewers,mccr8 2023-11-27 21:11:10 +00:00
mscom Bug 1865867 - [1/2] Modernize ApartmentRegion{,T} r=handyman 2023-11-30 02:43:39 +00:00
testshell Bug 1859893 - batch 15 - migrate xpcshell.ini -> .toml. r=aryx,geckoview-reviewers,extension-reviewers,valentin,cookie-reviewers,pbz,owlish,robwu 2023-11-24 14:41:35 +00:00
moz.build
pull-chromium.py Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato 2023-09-06 16:14:30 +00:00