Bug P3
Status Update
Comments
jl...@chromium.org <jl...@chromium.org> #2
- As part of this, we should look into the cost of PID namespaces.
- Network namespace used to be very expensive (see https://crbug.com/chromium/110756).
This was fixed ( http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=976a702ac9eeacea09e588456ab165dc06f9ee83), but we should still probably keep all renderers in the same network namespace.
- Network namespace used to be very expensive (see
This was fixed (
ri...@chromium.org <ri...@chromium.org> #3
I looked through the main work that happens in creating new pid namespaces, and the only thing that stood out was how it allocates a page for the pid map. On a sendmsg with SCM_CREDENTIALS, I didn't see anything that jumped out as being slow for translating the pid. mdempsky mentioned in https://codereview.chromium.org/868233011/ that he remembered seeing slowdowns on UnixDomainSocketTest.DoubleNamespace on precise vs. trusty, but hopefully this won't be an issue since we'll only be doing this on machines that support user namespaces.
I did a couple of runs of the startup.warm.blank_page on my work machine and didn't see any obvious differences in startup.warm.blank_page:foreground_tab_load_complete (which is the component that includes renderer startup time). There was a lot of variance though, so not sure how useful this result is.
I did a couple of runs of the startup.warm.blank_page on my work machine and didn't see any obvious differences in startup.warm.blank_page:foreground_tab_load_complete (which is the component that includes renderer startup time). There was a lot of variance though, so not sure how useful this result is.
jl...@chromium.org <jl...@chromium.org> #4
[Empty comment from Monorail migration]
jl...@chromium.org <jl...@chromium.org> #5
[Empty comment from Monorail migration]
jl...@chromium.org <jl...@chromium.org> #6
Changing the title to reflect doing this for NaCl processes as well.
When processes are running with PID = 1, typically terminating signals are ignored, unless a signal handler is explicitly installed.
NaCl doesn't like pre-existing signal handlers, but we already made an exception a while back for crashing signal handlers (this was done for SIGSYS).
We'll need to do something along these lines as well.
When processes are running with PID = 1, typically terminating signals are ignored, unless a signal handler is explicitly installed.
NaCl doesn't like pre-existing signal handlers, but we already made an exception a while back for crashing signal handlers (this was done for SIGSYS).
We'll need to do something along these lines as well.
bu...@chromium.org <bu...@chromium.org> #7
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/4557699fbb30704f76c68b906d2656d2e322572c
commit 4557699fbb30704f76c68b906d2656d2e322572c
Author: rickyz <rickyz@chromium.org>
Date: Fri Mar 27 22:31:15 2015
Start all children in their own PID namespace.
BUG=460972
Review URL: https://codereview.chromium.org/868233011
Cr-Commit-Position: refs/heads/master@{#322660}
[modify] http://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c/content/common/sandbox_linux/sandbox_linux.cc
[modify] http://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c/content/common/sandbox_linux/sandbox_linux.h
[modify] http://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c/content/zygote/zygote_linux.cc
[modify] http://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c/content/zygote/zygote_main_linux.cc
[modify] http://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c/sandbox/linux/services/credentials.cc
[modify] http://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c/sandbox/linux/services/credentials.h
[modify] http://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c/sandbox/linux/services/credentials_unittest.cc
[modify] http://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c/sandbox/linux/services/namespace_sandbox.cc
[modify] http://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c/sandbox/linux/services/namespace_sandbox.h
[modify] http://crrev.com/4557699fbb30704f76c68b906d2656d2e322572c/sandbox/linux/services/namespace_sandbox_unittest.cc
commit 4557699fbb30704f76c68b906d2656d2e322572c
Author: rickyz <rickyz@chromium.org>
Date: Fri Mar 27 22:31:15 2015
Start all children in their own PID namespace.
BUG=460972
Review URL:
Cr-Commit-Position: refs/heads/master@{#322660}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #8
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/591f7ec686f9550fc4332b6cf7c3f0ea0544d558
commit 591f7ec686f9550fc4332b6cf7c3f0ea0544d558
Author: spang <spang@chromium.org>
Date: Mon Mar 30 22:09:06 2015
Revert of Start all children in their own PID namespace. (patchset #14 id:360001 of https://codereview.chromium.org/868233011/)
Reason for revert:
Appears to cause system lockups on Chrome OS. See crbug.com/471878
Original issue's description:
commit 591f7ec686f9550fc4332b6cf7c3f0ea0544d558
Author: spang <spang@chromium.org>
Date: Mon Mar 30 22:09:06 2015
Revert of Start all children in their own PID namespace. (patchset #14 id:360001 of
Reason for revert:
Appears to cause system lockups on Chrome OS. See
Original issue's description:
TBR=jln@chromium.org,mdempsky@chromium.org,rickyz@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=460972
Review URL:
Cr-Commit-Position: refs/heads/master@{#322891}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #9
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/ce8969517c091252c32c9af5b3dcb57eb17d431f
commit ce8969517c091252c32c9af5b3dcb57eb17d431f
Author: rickyz <rickyz@chromium.org>
Date: Wed Apr 01 01:33:52 2015
Add utility functions for forking new PID namespaces.
Also cleans up Credentials::SetCapabilities.
This change was split out of https://codereview.chromium.org/868233011/,
which was reverted due to a kernel bug.
BUG=460972
Review URL: https://codereview.chromium.org/1040193004
Cr-Commit-Position: refs/heads/master@{#323164}
[modify] http://crrev.com/ce8969517c091252c32c9af5b3dcb57eb17d431f/sandbox/linux/services/credentials.cc
[modify] http://crrev.com/ce8969517c091252c32c9af5b3dcb57eb17d431f/sandbox/linux/services/credentials.h
[modify] http://crrev.com/ce8969517c091252c32c9af5b3dcb57eb17d431f/sandbox/linux/services/credentials_unittest.cc
[modify] http://crrev.com/ce8969517c091252c32c9af5b3dcb57eb17d431f/sandbox/linux/services/namespace_sandbox.cc
[modify] http://crrev.com/ce8969517c091252c32c9af5b3dcb57eb17d431f/sandbox/linux/services/namespace_sandbox.h
[modify] http://crrev.com/ce8969517c091252c32c9af5b3dcb57eb17d431f/sandbox/linux/services/namespace_sandbox_unittest.cc
commit ce8969517c091252c32c9af5b3dcb57eb17d431f
Author: rickyz <rickyz@chromium.org>
Date: Wed Apr 01 01:33:52 2015
Add utility functions for forking new PID namespaces.
Also cleans up Credentials::SetCapabilities.
This change was split out of
which was reverted due to a kernel bug.
BUG=460972
Review URL:
Cr-Commit-Position: refs/heads/master@{#323164}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #10
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/3f16f8e52e917af2f33fc6248f12c0c8e9f9a376
commit 3f16f8e52e917af2f33fc6248f12c0c8e9f9a376
Author: rickyz <rickyz@chromium.org>
Date: Mon Apr 13 21:41:14 2015
Start all children in their own PID namespace.
This change was split out of https://codereview.chromium.org/868233011/,
which was reverted due to a kernel bug.
BUG=460972
Review URL: https://codereview.chromium.org/1057403002
Cr-Commit-Position: refs/heads/master@{#324917}
[modify] http://crrev.com/3f16f8e52e917af2f33fc6248f12c0c8e9f9a376/content/common/sandbox_linux/sandbox_linux.cc
[modify] http://crrev.com/3f16f8e52e917af2f33fc6248f12c0c8e9f9a376/content/common/sandbox_linux/sandbox_linux.h
[modify] http://crrev.com/3f16f8e52e917af2f33fc6248f12c0c8e9f9a376/content/zygote/zygote_linux.cc
[modify] http://crrev.com/3f16f8e52e917af2f33fc6248f12c0c8e9f9a376/content/zygote/zygote_main_linux.cc
commit 3f16f8e52e917af2f33fc6248f12c0c8e9f9a376
Author: rickyz <rickyz@chromium.org>
Date: Mon Apr 13 21:41:14 2015
Start all children in their own PID namespace.
This change was split out of
which was reverted due to a kernel bug.
BUG=460972
Review URL:
Cr-Commit-Position: refs/heads/master@{#324917}
[modify]
[modify]
[modify]
[modify]
pe...@google.com <pe...@google.com> #11
[AUTO] Moving all non essential bugs to the next Milestone. (This decision is based on the labels attached to your ticket.)
Ref: https://sites.google.com/a/chromium.org/dev/developers/ticket-milestone-punting-1
Ref:
jl...@chromium.org <jl...@chromium.org> #12
[Empty comment from Monorail migration]
jl...@chromium.org <jl...@chromium.org> #13
Ricky, any progress on the NaCl side of this?
pe...@google.com <pe...@google.com> #14
[AUTO] This issue has already been moved once and is lower than Priority 1,therefore removing mstone.
bu...@chromium.org <bu...@chromium.org> #15
The following revision refers to this bug:
https://chromium.googlesource.com/native_client/src/native_client.git/+/3b1b3cf099145cf3db831f7f29a251ac071c5290
commit 3b1b3cf099145cf3db831f7f29a251ac071c5290
Author: rickyz <rickyz@chromium.org>
Date: Fri Jun 05 16:42:22 2015
Add SIGHUP and SIGTERM handlers in NaCl.
When running NaCl code in a PID namespace, we need explicit handlers for
signals that we might receive from outside the PID namespace, such as
SIGTERM. This change installs a signal handler which exits by default.
BUG= https://code.google.com/p/chromium/issues/detail?id=460972
Review URL: https://codereview.chromium.org/1159803003
[modify] http://crrev.com/3b1b3cf099145cf3db831f7f29a251ac071c5290/src/trusted/service_runtime/linux/nacl_signal.c
commit 3b1b3cf099145cf3db831f7f29a251ac071c5290
Author: rickyz <rickyz@chromium.org>
Date: Fri Jun 05 16:42:22 2015
Add SIGHUP and SIGTERM handlers in NaCl.
When running NaCl code in a PID namespace, we need explicit handlers for
signals that we might receive from outside the PID namespace, such as
SIGTERM. This change installs a signal handler which exits by default.
BUG=
Review URL:
[modify]
ri...@chromium.org <ri...@chromium.org> #16
bu...@chromium.org <bu...@chromium.org> #17
The following revision refers to this bug:
https://chromium.googlesource.com/native_client/src/native_client.git/+/0f50a4b61659b23188e27ab42485d265d3d063dd
commit 0f50a4b61659b23188e27ab42485d265d3d063dd
Author: rickyz <rickyz@chromium.org>
Date: Tue Jun 16 02:38:12 2015
Exit with -sig when handling signals.
This is more consistent with the behavior in
src/trusted/service_runtime/nacl_signal_common.c.
BUG= http://code.google.com/p/chromium/issues/detail?id=460972
Review URL: https://codereview.chromium.org/1184233002
[modify] http://crrev.com/0f50a4b61659b23188e27ab42485d265d3d063dd/src/nonsfi/linux/irt_exception_handling.c
commit 0f50a4b61659b23188e27ab42485d265d3d063dd
Author: rickyz <rickyz@chromium.org>
Date: Tue Jun 16 02:38:12 2015
Exit with -sig when handling signals.
This is more consistent with the behavior in
src/trusted/service_runtime/nacl_signal_common.c.
BUG=
Review URL:
[modify]
bu...@chromium.org <bu...@chromium.org> #18
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/179aeb7b6d1d9bb4c58a1abdc3929df197116056
commit 179aeb7b6d1d9bb4c58a1abdc3929df197116056
Author: rickyz <rickyz@chromium.org>
Date: Fri Jun 19 00:18:46 2015
Build ForkWithFlags and part of NamespaceSandbox under nonsfi newlib.
These functions are needed for enabling separate PID namespaces for
nonsfi newlib NaCl processes.
This change is an adaptation of hidehiko@'s
https://codereview.chromium.org/1161933003/ with some additional
functions from NamespaceSandbox added.
BUG=460972
Review URL: https://codereview.chromium.org/1176413003
Cr-Commit-Position: refs/heads/master@{#335175}
[modify] http://crrev.com/179aeb7b6d1d9bb4c58a1abdc3929df197116056/base/base_nacl.gyp
[modify] http://crrev.com/179aeb7b6d1d9bb4c58a1abdc3929df197116056/base/process/launch.h
[modify] http://crrev.com/179aeb7b6d1d9bb4c58a1abdc3929df197116056/base/process/launch_posix.cc
[modify] http://crrev.com/179aeb7b6d1d9bb4c58a1abdc3929df197116056/sandbox/linux/services/namespace_sandbox.cc
[modify] http://crrev.com/179aeb7b6d1d9bb4c58a1abdc3929df197116056/sandbox/linux/services/namespace_sandbox.h
[modify] http://crrev.com/179aeb7b6d1d9bb4c58a1abdc3929df197116056/sandbox/linux/system_headers/linux_signal.h
commit 179aeb7b6d1d9bb4c58a1abdc3929df197116056
Author: rickyz <rickyz@chromium.org>
Date: Fri Jun 19 00:18:46 2015
Build ForkWithFlags and part of NamespaceSandbox under nonsfi newlib.
These functions are needed for enabling separate PID namespaces for
nonsfi newlib NaCl processes.
This change is an adaptation of hidehiko@'s
functions from NamespaceSandbox added.
BUG=460972
Review URL:
Cr-Commit-Position: refs/heads/master@{#335175}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
bu...@chromium.org <bu...@chromium.org> #19
The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src.git/+/d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245
commit d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245
Author: rickyz <rickyz@chromium.org>
Date: Fri Jun 19 08:30:26 2015
Enable one PID namespace per process for NaCl processes.
This CL does two things:
- Make the NaCl helper fork each process into a new PID namespace via
ForkInNewPidNamespace.
- Bring the non-NaCl process termination exit codes in line with NaCl's
default signal handlers, that is exit with an exit code of -sig &
0xff.
This change depends on https://codereview.chromium.org/1159803003, which
adds termination signals handlers in SFI NaCl.
BUG=460972
Review URL: https://codereview.chromium.org/1158793003
Cr-Commit-Position: refs/heads/master@{#335223}
[modify] http://crrev.com/d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245/components/nacl/loader/nacl_helper_linux.cc
[modify] http://crrev.com/d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245/components/nacl/loader/nonsfi/irt_exception_handling.cc
[modify] http://crrev.com/d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.cc
[modify] http://crrev.com/d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245/content/zygote/zygote_linux.cc
[modify] http://crrev.com/d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245/sandbox/linux/services/credentials.cc
[modify] http://crrev.com/d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245/sandbox/linux/services/credentials.h
[modify] http://crrev.com/d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245/sandbox/linux/services/namespace_sandbox.cc
[modify] http://crrev.com/d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245/sandbox/linux/services/namespace_sandbox.h
[modify] http://crrev.com/d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245/sandbox/linux/services/namespace_sandbox_unittest.cc
commit d423ad87b1fdc8a59a7c945c000bfbbd9d8b2245
Author: rickyz <rickyz@chromium.org>
Date: Fri Jun 19 08:30:26 2015
Enable one PID namespace per process for NaCl processes.
This CL does two things:
- Make the NaCl helper fork each process into a new PID namespace via
ForkInNewPidNamespace.
- Bring the non-NaCl process termination exit codes in line with NaCl's
default signal handlers, that is exit with an exit code of -sig &
0xff.
This change depends on
adds termination signals handlers in SFI NaCl.
BUG=460972
Review URL:
Cr-Commit-Position: refs/heads/master@{#335223}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
th...@chromium.org <th...@chromium.org> #20
Curious, what work remains at this point?
BTW, I suspect this is causing an annoyance for me. All the renderers' LOG() output now has pid=1, so I have trouble telling renderers apart in console logs. This makes developing for OOPIF slight more confusing.
BTW, I suspect this is causing an annoyance for me. All the renderers' LOG() output now has pid=1, so I have trouble telling renderers apart in console logs. This makes developing for OOPIF slight more confusing.
[Deleted User] <[Deleted User]> #21
jl...@chromium.org <jl...@chromium.org> #22
Lei: this should be pretty much done. There are some minimal things to figure out, like removing non-dumpability, but it should be other bugs.
For the issue with LOG(). This is somewhat related to https://crbug.com/chromium/501069. rickyz@, could you try to land your CL again ( https://chromiumcodereview.appspot.com/1186873006/) ?
For the issue with LOG(). This is somewhat related to
jl...@chromium.org <jl...@chromium.org> #23
#20: we actually have mechanisms to get one's real pid already. See https://crbug.com/chromium/357670. But we don't always want to give it away because we consider it a minor info leak. We will start with an implementation that has LOG print the real pid though. But in Release mode, we might switch to some other unique value at some point.
ri...@gmail.com <ri...@gmail.com> #24
i have that but it got taken away or got erase and i don't know how. so anyways i need someone to protect my motherboard and board appId on my chromebook.
ri...@chromium.org <ri...@chromium.org> #26
[Empty comment from Monorail migration]
be...@google.com <be...@google.com> #27
This is a P2 bug without an owner that hasn't been updated in over a year. A good rule of thumb for P2 is "nice to have" either for a milestone, a feature launch, a quarter, etc. I'm going to drop the priority. If you still feel like this is still nice to have, try to find an owner or retriage.
th...@chromium.org <th...@chromium.org> #28
Is this issue a WontFix at this point?
is...@google.com <is...@google.com> #29
This issue was migrated from crbug.com/chromium/460972?no_tracker_redirect=1
[Auto-CCs applied]
[Multiple monorail components: Internals>Sandbox, Security]
[Monorail blocking: crbug.com/chromium/312380, crbug.com/chromium/421748]
[Monorail components added to Component Tags custom field.]
[Auto-CCs applied]
[Multiple monorail components: Internals>Sandbox, Security]
[Monorail blocking:
[Monorail components added to Component Tags custom field.]
Description
We should try and separate renderers and have each live in its own PID namespace.
Currently, we enforce renderer separation via:
1. Making renderers non dumpable (weak)
2. seccomp-bpf (
Having each renderer in its own PID namespace would have us rely on a semantic that the kernel understands and enforces for us, which is more robust.