New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 729372 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

cros-disks: fails to put FUSE mounters in cgroup namespace as Chrome OS kernel 3.8 doesn't support it

Project Member Reported by benchan@chromium.org, Jun 4 2017

Issue description

When addressing  issue 722946 , we changed cros-disks to put the FUSE mounters in a separate cgroup namespace (https://chromium-review.googlesource.com/513491). However, Chrome OS kernel 3.8 apparently doesn't support cgroup namespace, so `unshare(CLONE_NEWCGROUP)` fails with EINVAL.
 
Labels: M-60
mmm, crap.  i think we've been telling people to use this more.  having every init script test for it doesn't scale.

Jorge: how do you feel about making namespace options not fail in minijail when they see EINVAL ?
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/47ec72b4cf358ebe5bc2abf0eaca4100d1a2d8fc

commit 47ec72b4cf358ebe5bc2abf0eaca4100d1a2d8fc
Author: Ben Chan <benchan@chromium.org>
Date: Tue Jun 06 01:33:58 2017

cros-disks: disable cgroup namespace for FUSE mounters

Chrome OS kernel 3.8 doesn't cgroup namespace, so this CL temporarily
disables cgroup namespace for FUSE mounters.

BUG= chromium:729372 
TEST=Run platform_CrosDisksFilesystem tests on devices with kernel 3.8.

Change-Id: I7c7ed7ac4e1b4fa1bfd32d29c11c496162ccbfe3
Reviewed-on: https://chromium-review.googlesource.com/523017
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/47ec72b4cf358ebe5bc2abf0eaca4100d1a2d8fc/cros-disks/fuse_mounter.cc

Labels: Merge-Request-60
Status: Fixed (was: Assigned)
Not sure we want to fail open on old kernels. cgroup namespaces are not currently the cornerstone of our isolation story but for the container case where we run a system (like Android or Linux with systemd) that uses cgroups extensively, I do think we want to partition that and know if we're somehow regressing.

Maybe we add a compile-time flag for namespace soft-fail (or maybe a subset of the new namespaces, like user and cgroup). Might be better than a run-time setting.
if it were a compile time flag, i think effectively we'd turn it on everywhere in CrOS

looking a bit more, CLONE_NEWCGROUP was added upstream in v4.6.  but we backported it to v4.4, v3.18, and v3.14.  that means both v3.8 and v3.10 lack support, but that's in line with our current Android/container plans -- we require v3.14+.

that leaves us with what to do about daemons in general.  currently it means we can't use cgroups namespaces.  i don't think hacking the kernel to stub/ignore this flag is a good idea as then userspace will stomp in the cgroup namespace thinking it has a unique view.  we could add a flag to minijail like --ignore-missing-cgroup and then just remember that every time we use -N, we also have to pass in that flag.
I don't mind adding a cmdline option to soft-fail cgroup namespaces.
Cc: josa...@chromium.org
+josafat for merge to M60
Project Member

Comment 9 by sheriffbot@chromium.org, Jun 7 2017

Labels: -Merge-Request-60 Hotlist-Merge-Approved Merge-Approved-60
Your change meets the bar and is auto-approved for M60. Please go ahead and merge the CL to branch 3112 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 7 2017

Labels: merge-merged-release-R60-9592.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/5e7e672fa066f8d2650281d9a7d7891f0f680d0e

commit 5e7e672fa066f8d2650281d9a7d7891f0f680d0e
Author: Ben Chan <benchan@chromium.org>
Date: Wed Jun 07 03:52:45 2017

cros-disks: disable cgroup namespace for FUSE mounters

Chrome OS kernel 3.8 doesn't cgroup namespace, so this CL temporarily
disables cgroup namespace for FUSE mounters.

BUG= chromium:729372 
TEST=Run platform_CrosDisksFilesystem tests on devices with kernel 3.8.

Change-Id: I7c7ed7ac4e1b4fa1bfd32d29c11c496162ccbfe3
Reviewed-on: https://chromium-review.googlesource.com/523017
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
(cherry picked from commit 47ec72b4cf358ebe5bc2abf0eaca4100d1a2d8fc)
Reviewed-on: https://chromium-review.googlesource.com/525055
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/5e7e672fa066f8d2650281d9a7d7891f0f680d0e/cros-disks/fuse_mounter.cc

Labels: -Merge-Approved-60 Merge-Merged
Summary: cros-disks: fails to put FUSE mounters in cgroup namespace as Chrome OS kernel 3.8 doesn't support it (was: cros-disks: fails to put FUSE mounters in cgroup namespace as Chrome OS kernel doesn't seem to support it)

Comment 12 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment