Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp724971imm; Fri, 10 Aug 2018 21:44:35 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxGnQQmqkHSEkYgeOB4n6/RvJtCVtIPRJsLuIUjwhazpyvEHiVFmeVv10HjrMklD4IKx0Ap X-Received: by 2002:a17:902:6b44:: with SMTP id g4-v6mr8543413plt.50.1533962675748; Fri, 10 Aug 2018 21:44:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533962675; cv=none; d=google.com; s=arc-20160816; b=o7llsgYWH6jLGs9yugUm2gX6pCOBnoi0EHYhd4G1nC9GB9fiVBk067zzQ8jwrqQMRy ZIwiapQYocwUd6eNP044VlQdFxPQhKQP9FoJCa/2Y28L/PGtwptmqEDYrbK1+EA7TH+W 14727EUv5dY6kL0QYADNfGI9sWragJK8x7jI11bkEMGBv4SXjvGp+mv06sboG1xXMmLq DrZOo+MVzQWZy/37LffVnuWJLrLCv915CL7ZiOEU0+0tLwRpQ4SzAgIOzxBjDoMpPWbm J5LYT5kNLJZ8GXzNFwdViPkPUm5j5iAuC7XhU89CDfZxa1T+X6LW6eNLkAIUWFIrJNia /TGw== 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 :arc-authentication-results; bh=wh1qORFVbZyMsY2cYG+AC5Tm6x8s/KBWpoNCqMY7K78=; b=cQtBiTRn4A7NSen1FKY6zkMlBPbKHtiuWviDO2KzlXIOdcc9prswEgs6NEXGpfB4Bc KeEjAn5A0Yxxgg5EwmJkMcC3vqeKP4+0Yvt+lgG9PzJWC0a2Ts89pabpZKrMCf254Py3 YZa0LZnoYWdVzfZrRIT7XHEwewuZLji4VuNjfTCzOrKBICrUUqUwSuHsEEkuEZ9Qpryy TxdlsmNr65ET9k1ZrFivWtCYYNvr5Wx6ReImL+jJIKGSLkaaKR72HoXegQuGG8c2PwUP QPbWUd6kv+JY4D5Wd5jJYscrFHEJcZkPnpMUWwMDj2Sm6jMRgHHZOXH0nBZr9K4Zkjor VOIw== 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 x5-v6si12147862pgg.75.2018.08.10.21.44.20; Fri, 10 Aug 2018 21:44:35 -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 S1727235AbeHKHQU (ORCPT + 99 others); Sat, 11 Aug 2018 03:16:20 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:40360 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726858AbeHKHQU (ORCPT ); Sat, 11 Aug 2018 03:16:20 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1foLkN-0000ul-2O; Fri, 10 Aug 2018 22:43:27 -0600 Received: from [97.119.167.31] (helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1foLkL-0001rK-9f; Fri, 10 Aug 2018 22:43:26 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Al Viro Cc: David Howells , John Johansen , Tejun Heo , 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, "Theodore Y. Ts'o" , Miklos Szeredi References: <153313703562.13253.5766498657900728120.stgit@warthog.procyon.org.uk> <87d0uqpba5.fsf@xmission.com> <20180810151606.GA6515@ZenIV.linux.org.uk> <87pnypiufr.fsf@xmission.com> <20180811015815.GD6515@ZenIV.linux.org.uk> <20180811021704.GE6515@ZenIV.linux.org.uk> Date: Fri, 10 Aug 2018 23:43:20 -0500 In-Reply-To: <20180811021704.GE6515@ZenIV.linux.org.uk> (Al Viro's message of "Sat, 11 Aug 2018 03:17:04 +0100") Message-ID: <87mutto6mv.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=1foLkL-0001rK-9f;;;mid=<87mutto6mv.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.167.31;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/WCCYVSKk/QTVxU98k2T+AX8pP+BodV3w= X-SA-Exim-Connect-IP: 97.119.167.31 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa06.xmission.com X-Spam-Level: X-Spam-Status: No, score=-0.2 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 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: ;Al Viro X-Spam-Relay-Country: X-Spam-Timing: total 1309 ms - load_scoreonly_sql: 0.15 (0.0%), signal_user_changed: 5 (0.4%), b_tie_ro: 3.2 (0.2%), parse: 1.94 (0.1%), extract_message_metadata: 16 (1.2%), get_uri_detail_list: 2.5 (0.2%), tests_pri_-1000: 11 (0.9%), tests_pri_-950: 1.51 (0.1%), tests_pri_-900: 1.22 (0.1%), tests_pri_-400: 28 (2.2%), check_bayes: 27 (2.1%), b_tokenize: 9 (0.7%), b_tok_get_all: 8 (0.6%), b_comp_prob: 3.2 (0.2%), b_tok_touch_all: 3.8 (0.3%), b_finish: 0.75 (0.1%), tests_pri_0: 1227 (93.7%), check_dkim_signature: 0.81 (0.1%), check_dkim_adsp: 3.1 (0.2%), tests_pri_500: 12 (0.9%), rewrite_mail: 0.00 (0.0%) Subject: Re: BUG: Mount ignores mount options 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Al Viro writes: > On Sat, Aug 11, 2018 at 02:58:15AM +0100, Al Viro wrote: >> On Fri, Aug 10, 2018 at 08:05:44PM -0500, Eric W. Biederman wrote: >> >> > All I proposed was that we distinguish between a first mount and an >> > additional mount so that userspace knows the options will be ignored. >> >> For pity sake, just what does it take to explain to you that your >> notions of "first mount" and "additional mount" ARE HEAVILY FS-DEPENDENT >> and may depend upon the pieces of state userland (especially in container) >> simply does not have? >> >> One more time, slowly: >> >> mount -t nfs4 wank.example.org:/foo/bar /mnt/a >> mount -t nfs4 wank.example.org:/baz/barf /mnt/b >> >> yield the same superblock. Is anyone who mounts something over NFS >> required to know if anybody else has mounted something from the same >> server, and if so how the hell are they supposed to find that out, >> so that they could decide whether they are creating the "first" or >> "additional" mount, whatever that might mean in this situation? >> >> And how, kernel-side, is that supposed to be handled by generic code >> of any description? >> >> While we are at it, >> mount -t nfs4 wank.example.org:/foo/bar -o wsize=16384 /mnt/c >> is *NOT* the same superblock as the previous two. > > s/as the previous two/as in the previous two cases/, that is - the first two > examples yield one superblock, this one - another. Exactly because the mount options differ. I don't have a problem if we have something sophisticated like nfs that handles all of the hairy details and does not reuse a superblock unless the mount options match. What I have a problem with is the helper for ordinary filesystems that are not as sophisticated as nfs that don't handle all of the option magic and give userspace something different from what userspace asked for. It may take a little generalization of the definitions I proposed but it still remains simple and straight forward. CMD_THESE_MOUNT_OPTIONS_NO_SURPRISES CMD_WHATEVER_ALREADY_EXISTS Or we can make the filesystems more sophisticated when we move them to the new API and perform the comparisons there. I think that is what David Howells is working on. Eric