Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp24988rwe; Thu, 13 Apr 2023 21:25:25 -0700 (PDT) X-Google-Smtp-Source: AKy350Y7Kzmtkct+uYk4P8O+VRCY0s17Rj1VV6JB9aA5f6U/0I8SqCnMna1YT/cM8aRzEys01Ao8 X-Received: by 2002:a17:90a:ab0e:b0:23d:35c9:bf1c with SMTP id m14-20020a17090aab0e00b0023d35c9bf1cmr4387414pjq.16.1681446325638; Thu, 13 Apr 2023 21:25:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681446325; cv=none; d=google.com; s=arc-20160816; b=e4DvY9Bw31LPRLE+4+KxNB2zGuUf2lz0k7+Ob/a6OZE2+RbTxnDxRPUyWM/4UpqsKN ayMi8lPpZTJdika+xndGnxZzMZ5XmfxWy4dI1It1eSa/4ez5o8JitgxsIyuXM1yPuv5o dmKt7X6BMJs43jARyLlqtrAgxkZdoddY5tYS7lewOdyDhQA4UPQY2zeOpVPWg2Ru32iS afFiGmyB4h8hff6ZftytcMJvp6M1nHaQPpUOR53vzeXadqh2tAJU7bKiF/22RCf5ugYH vMP3cF/cfePQECezPqzv1OGHLkCclaRy8hvlqhEHkrn7Noy2a1Q3s/g72qDqlJev32Or miug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jdps3r6fgYR8iwPcyplXDldaP6A4WGQs91BonlW9KMQ=; b=o/DRSQmwX4xdjvRtWNtyOlK0UehZzfJO9ToTE7Z9NIEvXpWxjdQuC40xsyEIHPKUYl MZpE/WvSZbz5K3GanKhJK2haUtg7hqM1bpTsoEO6cs0SH288CudbL7otapRowRYnHJ07 N4+dfyelG+wq5K6JNdjzmV6MPf9MkKzZpLNmwOUYLloGGB2SPfi5J64aUCTau2xg1yjM 7STMQJ7E3waMJgxmzKH/MASuS5Xgg4KXUoWxu5Vxovso/rDOIa5ASNamyj10Sbi3il6B VaphbfCk/kaWTcX3OOi0FrYLPVTuWJZSNl8TGBILFJMdENH0mO7tKmfOfzUkf3Md3Hwk kXdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=sx9fxINc; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z3-20020a63d003000000b005075581074bsi3587918pgf.446.2023.04.13.21.25.09; Thu, 13 Apr 2023 21:25:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=sx9fxINc; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229591AbjDNEVN (ORCPT + 99 others); Fri, 14 Apr 2023 00:21:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbjDNEVN (ORCPT ); Fri, 14 Apr 2023 00:21:13 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2B5444B2; Thu, 13 Apr 2023 21:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jdps3r6fgYR8iwPcyplXDldaP6A4WGQs91BonlW9KMQ=; b=sx9fxINcbWPbnHjCjX/Y3sAUiX iSBpALQJKnaqvR0yvC2UpxuEidZ7a9t7Sil+lSqVyIEAyfub2n2JNx0fuCS4ziQwAmiEUgNZvWit9 LWecx1R12XcwTI7pCuqNsLPROaTYLbohdohSsZrIDOZ9+zSE2WIjuivYu3FfdZcj0+r1RnHuhbNl0 iv5jxfUfA8wQ/QRhb8nWru0sz7Zay1b8KBgtz6J7KQa4V6jIKGwdnTknxkFzTrxqyRhRuAJmjXjUI N3NqGqqp46x97lR599e8n6fQNSEtjF9suyq3Wxo1fOXzhk0jNqTiYckhS+vn7NV+9TQCKYAZfAFqk tR98CjTQ==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1pnAvo-008qNF-2r; Fri, 14 Apr 2023 04:21:04 +0000 Date: Fri, 14 Apr 2023 05:21:04 +0100 From: Al Viro To: Trond Myklebust Cc: Neil Brown , Jeffrey Layton , Christian Brauner , Dave Wysochanski , linux-fsdevel , linux-nfs , David Howells , Christoph Hellwig Subject: Re: allowing for a completely cached umount(2) pathwalk Message-ID: <20230414042104.GI3390869@ZenIV> References: <95ee689c76bf034fa2fe9fade0bccdb311f3a04f.camel@kernel.org> <168142566371.24821.15867603327393356000@noble.neil.brown.name> <20230414024312.GF3390869@ZenIV> <8EC5C625-ACD6-4BA0-A190-21A73CCBAC34@hammerspace.com> <20230414035104.GH3390869@ZenIV> <93A5B3C4-0E20-4531-9B65-0D24C092CE70@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <93A5B3C4-0E20-4531-9B65-0D24C092CE70@hammerspace.com> Sender: Al Viro X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Fri, Apr 14, 2023 at 04:06:03AM +0000, Trond Myklebust wrote: > > > > On Apr 13, 2023, at 23:51, Al Viro wrote: > > > > On Fri, Apr 14, 2023 at 03:28:45AM +0000, Trond Myklebust wrote: > > > >> We already have support for directory file descriptors when mounting with move_mount(). Why not add a umountat() with similar support for the unmount side? > >> Then add a syscall to allow users with (e.g.) the CAP_DAC_OVERRIDE privilege to convert the mount-id into an O_PATH file descriptor. > > > > You can already do umount -l /proc/self/fd/69 if you have a descriptor. > > Converting mount-id to O_PATH... might be an interesting idea. > > A dedicated umountat() might avoid the need for the lazy flag, if it were allowed to close the descriptor on success for the special case of an empty path. No. It's a wrong abstraction layer, anyway - "close the descriptor" != "make the opened file close", nevermind that it's a very odd corner case that will cause a lot of headache down the road.