Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Issue 1346923006: Refactor the bootstrap sandbox process launching integration. (Closed)

Created:
5 years, 3 months ago by Robert Sesek
Modified:
5 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, rickyz+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor the bootstrap sandbox process launching integration. There are three changes: - A LaunchOptions::PreExecDelegate is now used to perform the bootstrap port replacement in the new child. This removes sandbox-specific knowledge from //base. - The replacement bootstrap port is no longer registered with launchd. Instead, a new sandbox manager port is registered. Clients communicate with this server to get the replacement bootstrap port. - Using the above port, clients now perform a post-fork-pre-exec handshake to check in with the sandbox server. This removes the complicated PrepareToFork/FinishedFork interface. BUG=367863, 388214 R=mark@chromium.org Committed: https://crrev.com/408d2ee53267204220f2062a97bd7fe7b9a69354 Cr-Commit-Position: refs/heads/master@{#349571}

Patch Set 1 #

Total comments: 24

Patch Set 2 : Address comments #

Total comments: 14

Patch Set 3 : #

Patch Set 4 : RevokeToken #

Unified diffs Side-by-side diffs Delta from patch set Stats (+343 lines, -141 lines) Patch
M base/process/launch.h View 2 chunks +0 lines, -15 lines 0 comments Download
M base/process/launch_mac.cc View 1 chunk +0 lines, -28 lines 0 comments Download
M base/process/launch_posix.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/bootstrap_sandbox_mac.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 2 chunks +12 lines, -10 lines 0 comments Download
M sandbox/mac/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M sandbox/mac/bootstrap_sandbox.h View 1 2 3 5 chunks +48 lines, -32 lines 0 comments Download
M sandbox/mac/bootstrap_sandbox.cc View 1 2 3 5 chunks +172 lines, -46 lines 0 comments Download
M sandbox/mac/bootstrap_sandbox_unittest.mm View 3 chunks +9 lines, -6 lines 0 comments Download
A sandbox/mac/pre_exec_delegate.h View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download
A sandbox/mac/pre_exec_delegate.cc View 1 1 chunk +59 lines, -0 lines 0 comments Download
M sandbox/mac/sandbox_mac.gypi View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (2 generated)
Robert Sesek
5 years, 3 months ago (2015-09-17 19:14:22 UTC) #1
Mark Mentovai
https://codereview.chromium.org/1346923006/diff/1/sandbox/mac/bootstrap_sandbox.cc File sandbox/mac/bootstrap_sandbox.cc (right): https://codereview.chromium.org/1346923006/diff/1/sandbox/mac/bootstrap_sandbox.cc#newcode24 sandbox/mac/bootstrap_sandbox.cc:24: mach_msg_body_t body; Since requests aren’t complex, you don’t need ...
5 years, 3 months ago (2015-09-17 19:45:16 UTC) #2
Robert Sesek
https://codereview.chromium.org/1346923006/diff/1/sandbox/mac/bootstrap_sandbox.cc File sandbox/mac/bootstrap_sandbox.cc (right): https://codereview.chromium.org/1346923006/diff/1/sandbox/mac/bootstrap_sandbox.cc#newcode24 sandbox/mac/bootstrap_sandbox.cc:24: mach_msg_body_t body; On 2015/09/17 19:45:15, Mark Mentovai - August ...
5 years, 3 months ago (2015-09-17 20:27:24 UTC) #3
Mark Mentovai
https://codereview.chromium.org/1346923006/diff/20001/sandbox/mac/bootstrap_sandbox.cc File sandbox/mac/bootstrap_sandbox.cc (right): https://codereview.chromium.org/1346923006/diff/20001/sandbox/mac/bootstrap_sandbox.cc#newcode81 sandbox/mac/bootstrap_sandbox.cc:81: if (!sandbox->launchd_server_->Initialize(MACH_PORT_NULL)) Is Initialize ever called with an argument ...
5 years, 3 months ago (2015-09-17 21:39:57 UTC) #4
Robert Sesek
https://codereview.chromium.org/1346923006/diff/20001/sandbox/mac/bootstrap_sandbox.cc File sandbox/mac/bootstrap_sandbox.cc (right): https://codereview.chromium.org/1346923006/diff/20001/sandbox/mac/bootstrap_sandbox.cc#newcode81 sandbox/mac/bootstrap_sandbox.cc:81: if (!sandbox->launchd_server_->Initialize(MACH_PORT_NULL)) On 2015/09/17 21:39:56, Mark Mentovai - August ...
5 years, 3 months ago (2015-09-17 22:04:44 UTC) #5
Mark Mentovai
https://codereview.chromium.org/1346923006/diff/20001/sandbox/mac/bootstrap_sandbox.cc File sandbox/mac/bootstrap_sandbox.cc (right): https://codereview.chromium.org/1346923006/diff/20001/sandbox/mac/bootstrap_sandbox.cc#newcode156 sandbox/mac/bootstrap_sandbox.cc:156: awaiting_processes_[token] = sandbox_policy_id; Robert Sesek wrote: > On 2015/09/17 ...
5 years, 3 months ago (2015-09-17 22:10:53 UTC) #6
Robert Sesek
https://codereview.chromium.org/1346923006/diff/20001/sandbox/mac/bootstrap_sandbox.cc File sandbox/mac/bootstrap_sandbox.cc (right): https://codereview.chromium.org/1346923006/diff/20001/sandbox/mac/bootstrap_sandbox.cc#newcode156 sandbox/mac/bootstrap_sandbox.cc:156: awaiting_processes_[token] = sandbox_policy_id; On 2015/09/17 22:10:53, Mark Mentovai - ...
5 years, 3 months ago (2015-09-17 22:21:54 UTC) #7
Mark Mentovai
LGTM
5 years, 3 months ago (2015-09-17 22:26:04 UTC) #8
Robert Sesek
+avi for content
5 years, 3 months ago (2015-09-17 22:30:46 UTC) #10
Avi (use Gerrit)
content lgtm
5 years, 3 months ago (2015-09-17 23:54:20 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1346923006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1346923006/60001
5 years, 3 months ago (2015-09-18 00:49:24 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 3 months ago (2015-09-18 01:18:10 UTC) #14
commit-bot: I haz the power
5 years, 3 months ago (2015-09-18 01:18:49 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/408d2ee53267204220f2062a97bd7fe7b9a69354
Cr-Commit-Position: refs/heads/master@{#349571}

Powered by Google App Engine
This is Rietveld 408576698