Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1322964imm; Thu, 4 Oct 2018 11:37:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV63R5WNk6I7LifYCj6Gc1VlZ7ZPy6yJicmETclFuaLVrYFBMbCPnLuF307DJzYoATWtqdGzv X-Received: by 2002:a62:2a07:: with SMTP id q7-v6mr8164650pfq.103.1538678277482; Thu, 04 Oct 2018 11:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538678277; cv=none; d=google.com; s=arc-20160816; b=j+v7RWqUHneF00qZjG+i5HvzBDBwRXPFxmfnYW2BRwwSwJPGfH81jQylIDqoFU7DL5 fK5LqknEUFev1094noP0fXj7oKGTxF3Ad8F2YmrOZgOBoFmNaU/mH6rvbfW7bRNmgLah 7oWrFP5va1IF+WOIBB2SWKYuNSruAShEUhA3s4hbS1spVcnd8CAH4oCrgtxXDeDmCIV5 TAIX96ZFGwEqoo//3pJbtwaR/JzYbF6RfNkggYen8u9UuINko25sEvTMtQrCib8Euo/X k+QeLk7guVpnwMADtWnQF5POQPOCihB+MOWWlVcPkCcWLnbSMhdCTNCtHnc4qSFIS36i YWzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from; bh=Ec8B8pmyudwCGYwgZMyjzsn+gmvkYPIgR06PP/1wvq8=; b=mpw8HnoiwBhgFCfLp+/NpAilIbetkNOdGYpIbv41Gy/gz8PQYrdsLMTjm6zP/QbWst g4CI+4nV8eL+0gmdYssVRsF8uqBFNpkKiJV4FjdbEiwMlUYoAwWAacEtCtTobFuVjt0+ 7xk6Pa1U+CF+r4Ka7jXOCPTxyty0ceXtUUPO1/HLsTdCKrlzaGUkziqskloYA4SFUloo gZhg8sTh9CpftUWaN6VBfGL8o7dQ+tbn4ILNcXNa2hJS5ibSrgRTAqM4GxN/DaCewvYo kGxgzyjcbrWFSP5nyP4SZoVIYsmYksth+CV0icDgxq7W1mhSEBNZSX35VuBxw5yyNipE osbw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h14-v6si6600274plk.130.2018.10.04.11.37.42; Thu, 04 Oct 2018 11:37:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728218AbeJEBb7 (ORCPT + 99 others); Thu, 4 Oct 2018 21:31:59 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:37166 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727789AbeJEBb7 (ORCPT ); Thu, 4 Oct 2018 21:31:59 -0400 Received: from in02.mta.xmission.com ([166.70.13.52]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1g88V3-0006ew-Gw; Thu, 04 Oct 2018 12:37:25 -0600 Received: from [105.184.227.67] (helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1g88V2-0000lQ-Ck; Thu, 04 Oct 2018 12:37:25 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: David Howells Cc: viro@zeniv.linux.org.uk, John Johansen , Tejun Heo , "Eric W. Biederman" , selinux@tycho.nsa.gov, Paul Moore , Li Zefan , linux-api@vger.kernel.org, apparmor@lists.ubuntu.com, Casey Schaufler , fenghua.yu@intel.com, Greg Kroah-Hartman , Eric Biggers , linux-security-module@vger.kernel.org, Tetsuo Handa , Johannes Weiner , Stephen Smalley , tomoyo-dev-en@lists.sourceforge.jp, cgroups@vger.kernel.org, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, mszeredi@redhat.com References: <153754740781.17872.7869536526927736855.stgit@warthog.procyon.org.uk> Date: Thu, 04 Oct 2018 20:37:09 +0200 In-Reply-To: <153754740781.17872.7869536526927736855.stgit@warthog.procyon.org.uk> (David Howells's message of "Fri, 21 Sep 2018 17:30:08 +0100") Message-ID: <87sh1ld0dm.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=1g88V2-0000lQ-Ck;;;mid=<87sh1ld0dm.fsf@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=105.184.227.67;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+Amy9+X87RMMZdxlLTh3md5UNJ0E9sHG4= X-SA-Exim-Connect-IP: 105.184.227.67 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa08.xmission.com X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG,XMNoVowels,XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 1.5 XMNoVowels Alpha-numberic number with no vowels * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa08 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa08 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;David Howells X-Spam-Relay-Country: X-Spam-Timing: total 207 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 4.2 (2.0%), b_tie_ro: 3.4 (1.6%), parse: 0.88 (0.4%), extract_message_metadata: 2.4 (1.2%), get_uri_detail_list: 1.10 (0.5%), tests_pri_-1000: 3.8 (1.9%), tests_pri_-950: 1.10 (0.5%), tests_pri_-900: 0.98 (0.5%), tests_pri_-400: 24 (11.4%), check_bayes: 22 (10.8%), b_tokenize: 6 (2.9%), b_tok_get_all: 8 (3.9%), b_comp_prob: 2.1 (1.0%), b_tok_touch_all: 4.0 (1.9%), b_finish: 0.66 (0.3%), tests_pri_-100: 5 (2.6%), check_dkim_signature: 0.42 (0.2%), check_dkim_adsp: 2.6 (1.2%), tests_pri_0: 152 (73.2%), tests_pri_10: 2.00 (1.0%), tests_pri_500: 4.9 (2.4%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH 00/34] VFS: Introduce filesystem context [ver #12] 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David, I have been going through these and it is a wonderful proof of concept patchset. There are a couple significant problems with it however. - Many patches do more than one thing that could benefit from being broken up into more patches so that there is only one logical change per patch. I have attempted a little of that and have found several significant bugs. - There are many unnecessary changes in this patchset that just add noise and make it difficult to review. - There are many typos and thinkos in this patchset that while not hard to correct keep this from being anywhere close to being ready for prime time. - Some of the bugs I have encountered. * proc that isn't pid_ns_prepare_proc does not set fc->user_ns to match the pid namespace. * mqueue does not set fc->user_ns to match the ipc namespace. * The cpuset filesystem always fails to mount * Non-converted filesystems don't have the old security hooks and only have a bit blob so don't call into the new security hooks either. * The changes to implement the new security hooks at least for selinux are riddled with typos, and thinkos. I was hoping to get into the semantic questions but I can't get there until I get a good solid baseline patch to work with. I have been able to hoist the permission check out of sget_fc for converted filesystems. So progress is being made. That absolutely requires fc->user_ns to be set properly before vfs_get_tree. Something that still needs to be fixed. I have also observed that by not allowing unconverted filesystems to mount using the new api. The compatbitility code can be significantly simplified, and the who data_size problem goes away. I am going to be travelling for the next couple of days so I don't expect I will be able to answer questions in a timely manner. In the hopes that it might help below is my work in progress git tree where I have cleaned up some of these issues. https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git new-mount-api-testing Eric