From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752126AbdBTE3o (ORCPT ); Sun, 19 Feb 2017 23:29:44 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:38160 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751918AbdBTE3l (ORCPT ); Sun, 19 Feb 2017 23:29:41 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: James Bottomley Cc: Vivek Goyal , Amir Goldstein , Djalal Harouni , Chris Mason , Theodore Tso , Josh Triplett , Andy Lutomirski , Seth Forshee , linux-fsdevel , linux-kernel , LSM List , Dongsu Park , David Herrmann , Miklos Szeredi , Alban Crequy , Al Viro , "Serge E. Hallyn" , Phil Estes References: <1486235880.2484.17.camel@HansenPartnership.com> <1486235972.2484.19.camel@HansenPartnership.com> <1486343891.2496.54.camel@HansenPartnership.com> <20170214230305.GC4017@redhat.com> <1487115955.3133.73.camel@HansenPartnership.com> <20170215141734.GA2101@redhat.com> <1487260318.2944.18.camel@HansenPartnership.com> <20170216164233.GC23490@redhat.com> <1487264301.2944.51.camel@HansenPartnership.com> <87a89l7f4y.fsf@xmission.com> <1487351993.4351.17.camel@HansenPartnership.com> Date: Mon, 20 Feb 2017 17:24:52 +1300 In-Reply-To: <1487351993.4351.17.camel@HansenPartnership.com> (James Bottomley's message of "Fri, 17 Feb 2017 09:19:53 -0800") Message-ID: <87ino5ebfv.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=1cffbN-0004Xb-SB;;;mid=<87ino5ebfv.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=101.100.131.232;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/JuBcuX5KjMJMlK5JhQ4IGnoO5SoGmhYQ= X-SA-Exim-Connect-IP: 101.100.131.232 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 1.5 XMNoVowels Alpha-numberic number with no vowels * 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] * 1.0 XMSubMetaSx_00 1+ Sexy Words * 1.2 XMSubMetaSxObfu_03 Obfuscated Sexy Noun-People X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ***;James Bottomley X-Spam-Relay-Country: X-Spam-Timing: total 5305 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.4 (0.1%), b_tie_ro: 2.3 (0.0%), parse: 1.04 (0.0%), extract_message_metadata: 13 (0.3%), get_uri_detail_list: 1.29 (0.0%), tests_pri_-1000: 6 (0.1%), tests_pri_-950: 1.15 (0.0%), tests_pri_-900: 0.98 (0.0%), tests_pri_-400: 21 (0.4%), check_bayes: 20 (0.4%), b_tokenize: 7 (0.1%), b_tok_get_all: 7 (0.1%), b_comp_prob: 1.72 (0.0%), b_tok_touch_all: 2.7 (0.1%), b_finish: 0.68 (0.0%), tests_pri_0: 848 (16.0%), check_dkim_signature: 0.63 (0.0%), check_dkim_adsp: 3.4 (0.1%), tests_pri_500: 4407 (83.1%), poll_dns_idle: 4400 (82.9%), rewrite_mail: 0.00 (0.0%) Subject: Re: [RFC 1/1] shiftfs: uid/gid shifting bind mount 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 in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org James Bottomley writes: > On Fri, 2017-02-17 at 14:57 +1300, Eric W. Biederman wrote: >> I think I am missing something but I completely do not understand >> that subthread that says use file marks and perform the work in the >> vfs. The problem is that fundamentally we need multiple mappings and >> I don't see a mark on a file (even an inherited mark) providing the >> mapping so I don't see the point. > > The point of the mark is that it's a statement by the system > administrator that the underlying subtree is safe to be mounted by an > unprivileged container in the containers user view (i.e. with > current_user_ns() == s_user_ns). For the unprivileged container > there's no real arbitrary s_user_ns use case because the unprivileged > container must prove it can set up the mapping, so it would likely > always be mounting from within a user_ns with the mapping it wanted. As a statement that it is ok for the unprivileged mapping code to operate that seems reasonable. I don't currently the need for such an ok from the system adminstrator, but if you need it a flag that propagates to children and child directories seems reasonable. Eric