From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f177.google.com ([209.85.210.177]:42001 "EHLO mail-pf1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbeHJRG3 (ORCPT ); Fri, 10 Aug 2018 13:06:29 -0400 Received: by mail-pf1-f177.google.com with SMTP id l9-v6so4615583pff.9 for ; Fri, 10 Aug 2018 07:36:19 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: BUG: Mount ignores mount options From: Andy Lutomirski In-Reply-To: <87d0uqpba5.fsf@xmission.com> Date: Fri, 10 Aug 2018 07:36:17 -0700 Cc: David Howells , viro@zeniv.linux.org.uk, 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 Content-Transfer-Encoding: quoted-printable Message-Id: <0F2FA70F-8C7E-4D7D-B685-244A76BDB459@amacapital.net> References: <153313703562.13253.5766498657900728120.stgit@warthog.procyon.org.uk> <87d0uqpba5.fsf@xmission.com> To: "Eric W. Biederman" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > On Aug 10, 2018, at 7:05 AM, Eric W. Biederman wro= te: >=20 >=20 > There is a serious problem with mount options today that fsopen does not > address. The problem is that mount options are ignored for block based > filesystems, and any other type of filesystem that follows the same > pattern. >=20 > /dev/loop0 /root/loop0-noacl-noquota-nouser_xattr ext4 rw,relatime,nouser_= xattr,noacl 0 0 > /dev/loop0 /root/loop0-acl-quota-user_xattr ext4 rw,relatime,nouser_xattr,= noacl 0 0 To make sure I understand correctly: the problem is that the second mount ig= nored the options because the device was already mounted, right? For the new API, I think the only remotely sane approach is to refuse to mou= nt or init or whatever you call it an already mounted bdev. If user code gen= uinely needs to bind-mount an existing mount that is known only by its bdev,= we can add a specific API just for that.=