Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp203210imm; Thu, 12 Jul 2018 17:25:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfJHXk3leud1aiBwu084okVm2WA2gvrsZB/wbRuThyKRyAf5b6QsqqhM7IiioocTjq+J2Pm X-Received: by 2002:a17:902:e00a:: with SMTP id ca10-v6mr4153367plb.224.1531441530044; Thu, 12 Jul 2018 17:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531441530; cv=none; d=google.com; s=arc-20160816; b=oHaVFFbaMfyXY3e4Jm2QTSsshK+QN1S+RtS87CNyrJhd2U2Mg89dLH+EW04Npx3AmU 1odPVbZoK5wv+EyC69DIc0KwpSB+zqHnD4HejO8WaFVETXPewkJpevPJV2+toisXbhfS 0yp2fwNsi6rQremxmgigcf+vLf5dSBBmj0geUTcTt3WItCHszTEM/0trSkzKKLqYWypH Dv3XzNpoeAINlGnOVsdZ+K6c4T4eA6f15zcdprk25qYlsL0FajbskkPk1Yow7hi8dr50 N3ZN63iaaLpFYGrTUJ7DHJi26eRRJi3Ki3sRiorm5W5YW+tgegrq+B25/3wLVLPTRKiW koYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=wPpcCU3p9jYCxBzorwoZM/1CzfSSTO/zU904RZghXVs=; b=AID+NTvyk9USYIm1j8tfCnMxMLdi046OUC2dpER1JM1lWRyyOGCcroAC2gDMH9i25D szNqqoSlghglYxpgx5PiLUiELcmoeEiR9nglNwIhjqdH8w7knnS6odS8aVNudk1maQsx g3q1Q/nLUHgOTc92Ri0dlWR3uRbRVv0OHXMolIqqWLiow8U+PfJcqPX8qqUVy0Zx5oTi mRo8wkOz/vH1Yvym0QlCcdBQdFzh9fyeanIlPRSFaDOcArvtYwCPa1k3K1m1bNdoGaAA bD/3VyEEjwo/DUe85fLoefp4+xMXyczqNy6b8XGn23U869C12uF0NGG7dNzPasT6xlD4 +03g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=dSmX0otC; 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 t1-v6si13859624pfb.208.2018.07.12.17.25.14; Thu, 12 Jul 2018 17:25:30 -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; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=dSmX0otC; 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 S2387805AbeGMAgk (ORCPT + 99 others); Thu, 12 Jul 2018 20:36:40 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:41340 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387768AbeGMAgk (ORCPT ); Thu, 12 Jul 2018 20:36:40 -0400 Received: by mail-pf0-f195.google.com with SMTP id c21-v6so16936408pfn.8 for ; Thu, 12 Jul 2018 17:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wPpcCU3p9jYCxBzorwoZM/1CzfSSTO/zU904RZghXVs=; b=dSmX0otCKv5e9JrDvnZyQZPjimVZUG0aOLri0+gEsfgQCRhiB/vN6BtNxYByTkYiPo S2nPPdvoI1eO1Yrlh7z7ODPXm5lbn8fRHhPKObaa5hKwvntUIqnCb7Ql/4LdoevLm0fS HhWEX9t2NCFidGFOIlUJBM5z1REnhK6/AbvN+jOCtrymwLeKS+w70K8TKCub/okC9Sb3 8ZK/1lwZCLvqHMST0w1x+H9ujO20XsTXmImFofKLfQvQRPE5Seo4EuM52M1Uzf6v1eGD TkTSGeAnh/ZyNG1HbsbEjocg9gAvIC6YWisth/5Tvpv3M71EbfnR8KcTspuz2m8n7m9g fD8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wPpcCU3p9jYCxBzorwoZM/1CzfSSTO/zU904RZghXVs=; b=n6C+N6NGBMmlwEOFupq+bcA3Fa5O12ezjdISMF8YP3FnTiVYmW5j+c1RzCaFIkT0MB MB2k6yO7rXPOvIqbiLtAkzUipucziDwnjk8s94HhgAxMdTb1F9etwFeOZyvDBEbrJCLu jHs2Dn6rGE0TDBPonN2Ovvs9ZvVNKu50nSR7NsnKYXLazJh0BySECuju3jLKuwIByyDG ULLmAZMbh0PYl0vBck7CYLP3BI5fB5N3Vwhch5B2t1pfCz/YA2OYCaFyH2lW0Eda8p1J yFI7UB1GI43OfdsWyxVoaqyefRUOFeBbawk+1nCCqNe9diTPUQx/UN7e8Ox5fpQyI/tR QrxA== X-Gm-Message-State: AOUpUlH0ltclvOCOZO8CmFyP7iCumjEMJ3kiousyf/mvTiwxDZxJzI1o E4r+L0a407fJxkCUEYruqVF7xQ== X-Received: by 2002:a63:5b0d:: with SMTP id p13-v6mr4064701pgb.202.1531441479989; Thu, 12 Jul 2018 17:24:39 -0700 (PDT) Received: from ?IPv6:2600:1011:b01e:e4d1:54df:ba07:cac1:aeab? ([2600:1011:b01e:e4d1:54df:ba07:cac1:aeab]) by smtp.gmail.com with ESMTPSA id r19-v6sm12364588pgo.68.2018.07.12.17.24.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 17:24:37 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9] From: Andy Lutomirski X-Mailer: iPhone Mail (15F79) In-Reply-To: <26064.1531440190@warthog.procyon.org.uk> Date: Thu, 12 Jul 2018 17:24:36 -0700 Cc: "Theodore Y. Ts'o" , Linus Torvalds , Andrew Lutomirski , Al Viro , Linux API , linux-fsdevel , Linux Kernel Mailing List , Jann Horn Content-Transfer-Encoding: quoted-printable Message-Id: <5A7CC3BF-5F4E-4624-A129-4BD0434D0747@amacapital.net> References: <3236C75A-5D74-4BB4-A1EC-06F6E22D810C@amacapital.net> <611054C7-D6E8-4C89-958E-3128C9305E1E@amacapital.net> <20180712223223.GA28610@thunk.org> <153126248868.14533.9751473662727327569.stgit@warthog.procyon.org.uk> <153126264966.14533.3388004240803696769.stgit@warthog.procyon.org.uk> <686E805C-81F3-43D0-A096-50C644C57EE3@amacapital.net> <22370.1531293761@warthog.procyon.org.uk> <7002.1531407244@warthog.procyon.org.uk> <16699.1531426991@warthog.procyon.org.uk> <18233.1531430797@warthog.procyon.org.uk> <22105.1531436081@warthog.procyon.org.uk> <23894.1531438559@warthog.procyon.org.uk> <26064.1531440190@warthog.procyon.org.uk> To: David Howells Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jul 12, 2018, at 5:03 PM, David Howells wrote: >=20 > Andy Lutomirski wrote: >=20 >>>> I tend to think that this *should* fail using the new API. The semanti= cs >>>> of the second mount request are bizarre at best. >>>=20 >>> You still have to support existing behaviour lest you break userspace. >>>=20 >>=20 >> I assume the existing behavior is that a bind mount is created? If so, t= he >> new mount(8) tool could do it in user code. >=20 > You have a race there. >=20 > Also you can't currently directly create a bind mount from userspace as yo= u > can only bind from another path point - which you may not be able to acces= s > (either by permission failure or because it's not in your mount namespace)= . >=20 Are you trying to preserve the magic bind semantics with the new API? If yo= u are, I think it should be by explicit opt in only. Otherwise you risk havi= ng your shiny new way to specify fs options get ignored when the magic bind m= ount happens.=20=