Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639144

Re: [PATCH] fs: add an ioctl to get an owning userns for a superblock

Path csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From ebiederm@xmission.com (Eric W. Biederman)
Newsgroups linux.kernel
Subject Re: [PATCH] fs: add an ioctl to get an owning userns for a superblock
Date Thu, 11 May 2017 03:40:01 +0200
Message-ID <tFLfb-8aU-5@gated-at.bofh.it> (permalink)
References <tFmJQ-9n-13@gated-at.bofh.it> <tFnZf-Uf-7@gated-at.bofh.it> <tFLfb-8aU-7@gated-at.bofh.it>
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version 1.0
Content-Type text/plain
X-Xm-Spf eid=1d8cvt-0006es-5z;;;mid=<87efvwkwy7.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=97.121.81.159;;;frm=ebiederm@xmission.com;;;spf=neutral
X-Xm-Aid U2FsdGVkX18sFUWzSkVd68Y16xrFrZBM5Y64yFOIwmg=
X-Sa-Exim-Connect-IP 97.121.81.159
X-Sa-Exim-Mail-From ebiederm@xmission.com
X-Spam-Report * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1]
X-Spam-Dcc XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1
X-Spam-Combo ;Andrei Vagin <avagin@virtuozzo.com>
X-Spam-Timing total 5541 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.6 (0.0%), b_tie_ro: 1.85 (0.0%), parse: 0.72 (0.0%), extract_message_metadata: 14 (0.2%), get_uri_detail_list: 1.23 (0.0%), tests_pri_-1000: 3.9 (0.1%), tests_pri_-950: 1.19 (0.0%), tests_pri_-900: 0.97 (0.0%), tests_pri_-400: 18 (0.3%), check_bayes: 17 (0.3%), b_tokenize: 6 (0.1%), b_tok_get_all: 6 (0.1%), b_comp_prob: 1.73 (0.0%), b_tok_touch_all: 2.4 (0.0%), b_finish: 0.55 (0.0%), tests_pri_0: 1161 (21.0%), check_dkim_signature: 0.45 (0.0%), check_dkim_adsp: 2.5 (0.0%), tests_pri_500: 4336 (78.3%), poll_dns_idle: 4326 (78.1%), rewrite_mail: 0.00 (0.0%)
X-Spam-Flag No
X-Sa-Exim-Version 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600)
X-Sa-Exim-Scanned Yes (on in02.mta.xmission.com)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 38
Organization linux.* mail to news gateway
X-Original-Cc Andrei Vagin <avagin@openvz.org>, Alexander Viro <viro@zeniv.linux.org.uk>, <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-api@vger.kernel.org>, <criu@openvz.org>, Linux Containers <containers@lists.linux-foundation.org>
X-Original-Date Wed, 10 May 2017 20:24:00 -0500
X-Original-Message-ID <87efvwkwy7.fsf@xmission.com>
X-Original-References <20170509231938.6467-1-avagin@openvz.org> <87k25psg7b.fsf@xmission.com> <20170511001526.GA7992@outlook.office365.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1639144

Show key headers only | View raw


Andrei Vagin <avagin@virtuozzo.com> writes:

> On Tue, May 09, 2017 at 07:34:00PM -0500, Eric W. Biederman wrote:
>> Andrei Vagin <avagin@openvz.org> writes:
>> 
>> > The introduced ioctl returns a file descriptor that refers to a owning
>> > user namespace for a superblock which is associated with a target file
>> > descriptor.
>> >
>> > EPERM is returned if the current process doesn't have CAP_SYS_ADMIN in
>> > the returned user namespace.
>> >
>> > This information is required to dump and restore mount namespaces. We
>> > need to know to which user namespace a superblock is belonged to.
>> >
>> > We already have the SIOCGSKNS ioctl for sockets to get a network
>> > namespace, so it looks reasonable to use the same interface for
>> > superblocks too.
>> >
>> > This functionality can be useful for users in order to understand
>> > a running system.
>> 
>> This will probably work.  And the capability check eases any concerns
>> I might have that this would be a trivial information leak.
>> 
>> That said can we hold off just a little bit.  If open_fs work actually
>> turns into a real interface that would seem to be the perfect place
>> to stick this functionality.
>
> Sure, we can. Do you know any place where to read more information about
> open_fs? I think I have heared a few times about this idea, but it would be
> good to get more details.


Look for David Howells <dhowells@redhat.com> recent patches on lkml he
has implemented an initial rfc for it.

Eric

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] fs: add an ioctl to get an owning userns for a superblock Andrei Vagin <avagin@openvz.org> - 2017-05-10 01:30 +0200
  Re: [PATCH] fs: add an ioctl to get an owning userns for a superblock ebiederm@xmission.com (Eric W. Biederman) - 2017-05-10 02:50 +0200
    Re: [PATCH] fs: add an ioctl to get an owning userns for a superblock ebiederm@xmission.com (Eric W. Biederman) - 2017-05-11 03:40 +0200

csiph-web