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

Issue 868233011: Start all children in their own PID namespace. (Closed)

Created:
5 years, 10 months ago by rickyz (no longer on Chrome)
Modified:
5 years, 9 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

Start all children in their own PID namespace. BUG=460972 Committed: https://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c Cr-Commit-Position: refs/heads/master@{#322660}

Patch Set 1 : #

Total comments: 3

Patch Set 2 : Respond to comments. #

Patch Set 3 : Changes for the new DropAllCapabilities API. #

Patch Set 4 : Only drop capabilities if we have any. #

Total comments: 17

Patch Set 5 : Rebase. #

Patch Set 6 : Respond to some comments. #

Total comments: 13

Patch Set 7 : Respond to more comments. #

Total comments: 9

Patch Set 8 : Add CHECK test/stuff. #

Patch Set 9 : Oops, remove extra period. #

Patch Set 10 : Use push_back instead of confusing syntax. #

Total comments: 2

Patch Set 11 : Move Capability type inside Credentials. #

Patch Set 12 : Add InstallDefaultTerminationSignalHandlers. #

Total comments: 25

Patch Set 13 : Respond to comments. #

Patch Set 14 : More comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+336 lines, -43 lines) Patch
M content/common/sandbox_linux/sandbox_linux.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -0 lines 0 comments Download
M content/common/sandbox_linux/sandbox_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +6 lines, -1 line 0 comments Download
M content/zygote/zygote_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +40 lines, -4 lines 0 comments Download
M content/zygote/zygote_main_linux.cc View 1 2 3 4 5 3 chunks +15 lines, -1 line 0 comments Download
M sandbox/linux/services/credentials.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +17 lines, -9 lines 0 comments Download
M sandbox/linux/services/credentials.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +32 lines, -19 lines 0 comments Download
M sandbox/linux/services/credentials_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +12 lines, -9 lines 0 comments Download
M sandbox/linux/services/namespace_sandbox.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +36 lines, -0 lines 0 comments Download
M sandbox/linux/services/namespace_sandbox.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +76 lines, -0 lines 0 comments Download
M sandbox/linux/services/namespace_sandbox_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +94 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (8 generated)
rickyz (no longer on Chrome)
Here's a change to put all children in their own PID namespaces. It should be ...
5 years, 10 months ago (2015-02-07 05:14:04 UTC) #6
mdempsky
I like it. I'm worried if it will have any performance impact though: I seem ...
5 years, 10 months ago (2015-02-09 06:28:12 UTC) #7
rickyz (no longer on Chrome)
https://codereview.chromium.org/868233011/diff/80001/content/zygote/zygote_main_linux.cc File content/zygote/zygote_main_linux.cc (left): https://codereview.chromium.org/868233011/diff/80001/content/zygote/zygote_main_linux.cc#oldcode468 content/zygote/zygote_main_linux.cc:468: CHECK(sandbox::Credentials::DropAllCapabilities()); On 2015/02/09 06:28:12, mdempsky wrote: > On 2015/02/07 ...
5 years, 10 months ago (2015-02-24 06:11:34 UTC) #8
jln (very slow on Chromium)
Exciting times! Let's move as much stuff as possible into reasonable-looking API in sandbox/ As ...
5 years, 10 months ago (2015-02-25 21:32:49 UTC) #9
rickyz (no longer on Chrome)
https://codereview.chromium.org/868233011/diff/140001/content/common/sandbox_linux/sandbox_linux.h File content/common/sandbox_linux/sandbox_linux.h (right): https://codereview.chromium.org/868233011/diff/140001/content/common/sandbox_linux/sandbox_linux.h#newcode123 content/common/sandbox_linux/sandbox_linux.h:123: int proc_fd() { return proc_fd_; } On 2015/02/25 21:32:48, ...
5 years, 9 months ago (2015-03-21 01:35:32 UTC) #10
jln (very slow on Chromium)
It's so hard to build a reasonable-looking API with all these possible codepath and this ...
5 years, 9 months ago (2015-03-24 22:03:34 UTC) #11
jln (very slow on Chromium)
https://chromiumcodereview.appspot.com/868233011/diff/180001/sandbox/linux/services/namespace_sandbox.h File sandbox/linux/services/namespace_sandbox.h (right): https://chromiumcodereview.appspot.com/868233011/diff/180001/sandbox/linux/services/namespace_sandbox.h#newcode74 sandbox/linux/services/namespace_sandbox.h:74: static void InstallTerminationSignalHandler(int sig, int exit_code); Meh: we still ...
5 years, 9 months ago (2015-03-24 22:57:40 UTC) #12
jln (very slow on Chromium)
https://chromiumcodereview.appspot.com/868233011/diff/180001/content/zygote/zygote_linux.cc File content/zygote/zygote_linux.cc (right): https://chromiumcodereview.appspot.com/868233011/diff/180001/content/zygote/zygote_linux.cc#newcode401 content/zygote/zygote_linux.cc:401: CHECK(sandbox::Credentials::DropAllCapabilities( We'll need an API to drop all capabilities ...
5 years, 9 months ago (2015-03-25 02:09:13 UTC) #13
rickyz (no longer on Chrome)
Respond to more comments.
5 years, 9 months ago (2015-03-25 22:45:22 UTC) #15
rickyz (no longer on Chrome)
https://codereview.chromium.org/868233011/diff/180001/content/common/sandbox_linux/sandbox_linux.cc File content/common/sandbox_linux/sandbox_linux.cc (right): https://codereview.chromium.org/868233011/diff/180001/content/common/sandbox_linux/sandbox_linux.cc#newcode193 content/common/sandbox_linux/sandbox_linux.cc:193: 1, sandbox::LinuxCapability::kCapSysAdmin); On 2015/03/24 22:03:34, jln wrote: > Why ...
5 years, 9 months ago (2015-03-25 22:47:46 UTC) #16
jln (very slow on Chromium)
https://chromiumcodereview.appspot.com/868233011/diff/180001/content/common/sandbox_linux/sandbox_linux.cc File content/common/sandbox_linux/sandbox_linux.cc (right): https://chromiumcodereview.appspot.com/868233011/diff/180001/content/common/sandbox_linux/sandbox_linux.cc#newcode193 content/common/sandbox_linux/sandbox_linux.cc:193: 1, sandbox::LinuxCapability::kCapSysAdmin); On 2015/03/25 22:47:46, rickyz wrote: > On ...
5 years, 9 months ago (2015-03-25 23:47:50 UTC) #17
rickyz (no longer on Chrome)
Add CHECK test/stuff.
5 years, 9 months ago (2015-03-26 00:08:53 UTC) #18
rickyz (no longer on Chrome)
https://codereview.chromium.org/868233011/diff/220001/content/zygote/zygote_linux.cc File content/zygote/zygote_linux.cc (right): https://codereview.chromium.org/868233011/diff/220001/content/zygote/zygote_linux.cc#newcode395 content/zygote/zygote_linux.cc:395: pid = sandbox::NamespaceSandbox::ForkInNewPidNamespace(true); On 2015/03/25 23:47:50, jln wrote: > ...
5 years, 9 months ago (2015-03-26 00:09:38 UTC) #19
rickyz (no longer on Chrome)
Oops, remove extra period.
5 years, 9 months ago (2015-03-26 00:10:20 UTC) #20
rickyz (no longer on Chrome)
Use push_back instead of confusing syntax.
5 years, 9 months ago (2015-03-26 00:12:47 UTC) #21
jln (very slow on Chromium)
https://codereview.chromium.org/868233011/diff/220001/sandbox/linux/services/namespace_sandbox_unittest.cc File sandbox/linux/services/namespace_sandbox_unittest.cc (right): https://codereview.chromium.org/868233011/diff/220001/sandbox/linux/services/namespace_sandbox_unittest.cc#newcode134 sandbox/linux/services/namespace_sandbox_unittest.cc:134: CHECK_EQ(1, getpid()); On 2015/03/26 00:09:37, rickyz wrote: > On ...
5 years, 9 months ago (2015-03-26 00:49:47 UTC) #22
rickyz (no longer on Chrome)
Move Capability type inside Credentials.
5 years, 9 months ago (2015-03-26 01:09:49 UTC) #23
rickyz (no longer on Chrome)
https://codereview.chromium.org/868233011/diff/280001/sandbox/linux/services/namespace_sandbox.h File sandbox/linux/services/namespace_sandbox.h (right): https://codereview.chromium.org/868233011/diff/280001/sandbox/linux/services/namespace_sandbox.h#newcode74 sandbox/linux/services/namespace_sandbox.h:74: static void InstallTerminationSignalHandler(int sig, int exit_code); On 2015/03/26 00:49:47, ...
5 years, 9 months ago (2015-03-26 05:36:35 UTC) #24
jln (very slow on Chromium)
Only a few nits. https://chromiumcodereview.appspot.com/868233011/diff/320001/sandbox/linux/services/credentials.h File sandbox/linux/services/credentials.h (right): https://chromiumcodereview.appspot.com/868233011/diff/320001/sandbox/linux/services/credentials.h#newcode33 sandbox/linux/services/credentials.h:33: kCapSysChroot, Nit: you could drop ...
5 years, 9 months ago (2015-03-26 22:01:34 UTC) #25
rickyz (no longer on Chrome)
5 years, 9 months ago (2015-03-27 03:07:29 UTC) #26
mdempsky
(Just two small nits; jln seems to have covered the rest of the CL pretty ...
5 years, 9 months ago (2015-03-27 20:32:11 UTC) #27
rickyz (no longer on Chrome)
https://codereview.chromium.org/868233011/diff/320001/content/common/sandbox_linux/sandbox_linux.h File content/common/sandbox_linux/sandbox_linux.h (right): https://codereview.chromium.org/868233011/diff/320001/content/common/sandbox_linux/sandbox_linux.h#newcode122 content/common/sandbox_linux/sandbox_linux.h:122: // after the sandbox has been sealed. On 2015/03/27 ...
5 years, 9 months ago (2015-03-27 21:08:03 UTC) #28
jln (very slow on Chromium)
lgtm https://codereview.chromium.org/868233011/diff/320001/sandbox/linux/services/namespace_sandbox.h File sandbox/linux/services/namespace_sandbox.h (right): https://codereview.chromium.org/868233011/diff/320001/sandbox/linux/services/namespace_sandbox.h#newcode74 sandbox/linux/services/namespace_sandbox.h:74: static void InstallDefaultTerminationSignalHandlers(); Add to the doc that ...
5 years, 9 months ago (2015-03-27 21:24:36 UTC) #29
rickyz (no longer on Chrome)
https://codereview.chromium.org/868233011/diff/320001/sandbox/linux/services/namespace_sandbox.h File sandbox/linux/services/namespace_sandbox.h (right): https://codereview.chromium.org/868233011/diff/320001/sandbox/linux/services/namespace_sandbox.h#newcode74 sandbox/linux/services/namespace_sandbox.h:74: static void InstallDefaultTerminationSignalHandlers(); On 2015/03/27 21:24:35, jln wrote: > ...
5 years, 9 months ago (2015-03-27 21:48:59 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/868233011/360001
5 years, 9 months ago (2015-03-27 21:49:31 UTC) #33
commit-bot: I haz the power
Committed patchset #14 (id:360001)
5 years, 9 months ago (2015-03-27 22:31:27 UTC) #34
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c Cr-Commit-Position: refs/heads/master@{#322660}
5 years, 9 months ago (2015-03-27 22:32:27 UTC) #35
spang
5 years, 8 months ago (2015-03-30 22:07:41 UTC) #36
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:360001) has been created in
https://codereview.chromium.org/1041163003/ by spang@chromium.org.

The reason for reverting is: Appears to cause system lockups on Chrome OS..

Powered by Google App Engine
This is Rietveld 408576698