Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1402641
| From | ebiederm@xmission.com (Eric W. Biederman) |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 03/21] fs: Allow sysfs and cgroupfs to share super blocks between user namespaces |
| Date | 2016-05-18 01:00 +0200 |
| Message-ID | <rzW81-2af-1@gated-at.bofh.it> (permalink) |
| References | <rzW81-2af-3@gated-at.bofh.it> <rzW81-2af-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Seth Forshee <seth.forshee@canonical.com> writes: > Both of these filesystems already have use cases for mounting the > same super block from multiple user namespaces. For sysfs this > happens when using criu for snapshotting a container, where sysfs > is mnounted in the containers network ns but the hosts user ns. > The cgroup filesystem shares the same super block for all mounts > of the same hierarchy regardless of the namespace. > > As a result, the restriction on mounting a super block from a > single user namespace creates regressions for existing uses of > these filesystems. For these specific filesystems this > restriction isn't really necessary since the backing store is > objects in kernel memory and thus the ids assigned from inodes > is not subject to translation relative to s_user_ns. > > Add a new filesystem flag, FS_USERNS_SHARE_SB, which when set > causes sget_userns() to skip the check of s_user_ns. Set this > flag for the sysfs and cgroup filesystems to fix the > regressions. So this one needs to be sget_userns(..., &init_user_ns, ...). And not a new special case. Apologies for not catching this earlier. I am looking at folding all of this into the patch that introduces sget_userns so that even bisects won't have regresssions. We loose the ability to call mount -o remount and actually affect these filesystems (which we don't have without s_user_ns) but we gain a whole lot of simplicity, and we don't break the xattr and security label on sysfs code. Eric
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v4 03/21] fs: Allow sysfs and cgroupfs to share super blocks between user namespaces ebiederm@xmission.com (Eric W. Biederman) - 2016-05-18 01:00 +0200
Re: [PATCH v4 03/21] fs: Allow sysfs and cgroupfs to share super blocks between user namespaces Seth Forshee <seth.forshee@canonical.com> - 2016-05-18 02:00 +0200
Re: [PATCH v4 03/21] fs: Allow sysfs and cgroupfs to share super blocks between user namespaces ebiederm@xmission.com (Eric W. Biederman) - 2016-05-18 18:00 +0200
Re: [PATCH v4 03/21] fs: Allow sysfs and cgroupfs to share super blocks between user namespaces Seth Forshee <seth.forshee@canonical.com> - 2016-05-18 18:20 +0200
Re: [PATCH v4 03/21] fs: Allow sysfs and cgroupfs to share super blocks between user namespaces ebiederm@xmission.com (Eric W. Biederman) - 2016-05-18 18:40 +0200
csiph-web