Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp192446imm; Fri, 10 Aug 2018 09:40:15 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwkR6WbMQTje71rRLutAr3TNKtfLkdIFlLueeI75kWjLQUNqtHk9hXAn//tbg1zF3iOEkaT X-Received: by 2002:a63:1015:: with SMTP id f21-v6mr7263157pgl.354.1533919215327; Fri, 10 Aug 2018 09:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533919215; cv=none; d=google.com; s=arc-20160816; b=RSmr/9fXiC2CqQqEFi5bDvS8cdsDn0QT4A9DlvZaNJienZRCd/9GabiVZVmP29Rx1G 7IWiXkQ6uG4r5e12aL/6XFjYBfuwcBKu8EOAGBSeOk4el5BhA25OsJ2aOyNFhPvEsM4X kmnTuFGSHKvUXP0XH8iQZI4QydYWSjw7FqrQQwxB+NnVw8rAxmG9LwMGfN/ej7toz2kt FjxCB0IV+XZStrzDLf9cID9EqVu1RXqRk0Hb9ZKXmgmxRpBoYo+y+NbGGdZ4NWgOLWYW ek0sFZUGXM55+KP3ORlewWujbzbL0Z5KY7dUQZuZQhybAy0UnLs8GEzxrkJNtR1owuBk d/Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:arc-authentication-results; bh=uOefMylMy+q2En387+16PzwbFnjCZCeb1G1rFaLbfoc=; b=oj+SG6a6W+56KG0/I1+2sc10s7wtNc6Sk2bIRkSGGNUQPapJQXMiWcBVz3uXCsWD04 AhWQN2KehdAvZ5WjbuQbawv6Zf4YDDuWdD2GnpRvfmBeeYVq0ojag9ecmGYDlDkzDvQJ EXV1qYHfE+O7gsujsHOzf0uKHTjZdwf/9g2xAbfPiPXhldF+qGmj35UNiHKhuEJ8Ks7m 64z9XY4IzLyVdL4eqFFF1yjhwHk54zi9Nev49UzuCciPRgMdR59cPwdYhl+A9LBIxXfa unAA7TLMd2NTuDDUavBxqr9IJcpkmkAbJx95cjG3v8N3dwPtFyrchP2IL/juWXY5lfWQ ic0Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b18-v6si9456524pgd.185.2018.08.10.09.39.59; Fri, 10 Aug 2018 09:40:15 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728124AbeHJRnb convert rfc822-to-8bit (ORCPT + 99 others); Fri, 10 Aug 2018 13:43:31 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:58278 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727381AbeHJRnb (ORCPT ); Fri, 10 Aug 2018 13:43:31 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5F86D818534C; Fri, 10 Aug 2018 15:13:14 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-78.rdu2.redhat.com [10.10.120.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8DB6A213ED6A; Fri, 10 Aug 2018 15:13:11 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <0F2FA70F-8C7E-4D7D-B685-244A76BDB459@amacapital.net> References: <0F2FA70F-8C7E-4D7D-B685-244A76BDB459@amacapital.net> <153313703562.13253.5766498657900728120.stgit@warthog.procyon.org.uk> <87d0uqpba5.fsf@xmission.com> To: Andy Lutomirski Cc: dhowells@redhat.com, "Eric W. Biederman" , 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 Subject: Re: BUG: Mount ignores mount options MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22557.1533913991.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Fri, 10 Aug 2018 16:13:11 +0100 Message-ID: <22558.1533913991@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 10 Aug 2018 15:13:14 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 10 Aug 2018 15:13:14 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andy Lutomirski wrote: > > /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 > ignored the options because the device was already mounted, right? > > For the new API, I think the only remotely sane approach is to refuse to > mount or init or whatever you call it an already mounted bdev. If user code > genuinely needs to bind-mount an existing mount that is known only by its > bdev, we can add a specific API just for that. I'm adding some flags to fsopen() to allow userspace to say whether it wants no sharing, same parameters-only sharing or anything-goes sharing (as now). I'm also adding a flag whereby userspace can forbid anyone else from sharing a new superblock it has just set up. David