From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754759AbdEKBab (ORCPT ); Wed, 10 May 2017 21:30:31 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:34517 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754697AbdEKBa2 (ORCPT ); Wed, 10 May 2017 21:30:28 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Andrei Vagin Cc: Andrei Vagin , Alexander Viro , , , , , Linux Containers References: <20170509231938.6467-1-avagin@openvz.org> <87k25psg7b.fsf@xmission.com> <20170511001526.GA7992@outlook.office365.com> Date: Wed, 10 May 2017 20:24:00 -0500 In-Reply-To: <20170511001526.GA7992@outlook.office365.com> (Andrei Vagin's message of "Wed, 10 May 2017 17:15:27 -0700") Message-ID: <87efvwkwy7.fsf@xmission.com> 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 X-Spam-Relay-Country: 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%) Subject: Re: [PATCH] fs: add an ioctl to get an owning userns for a superblock 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: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrei Vagin writes: > On Tue, May 09, 2017 at 07:34:00PM -0500, Eric W. Biederman wrote: >> Andrei Vagin 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 recent patches on lkml he has implemented an initial rfc for it. Eric