Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp132398rwb; Thu, 27 Jul 2023 10:19:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlF/Xn5ii/m+xSBKSCUB40KLRY6auf9SQ8PAESZ1XXAT+n+uUodHzJzg8fSMIXbbdN2KB1fL X-Received: by 2002:a05:6870:524d:b0:1bb:b98b:c2e8 with SMTP id o13-20020a056870524d00b001bbb98bc2e8mr18510oai.58.1690478389173; Thu, 27 Jul 2023 10:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690478389; cv=none; d=google.com; s=arc-20160816; b=WCLo4KTxpj4NXehOyq+W4NSAxvZEAzkSYxmH2on+Fj7+gj7D/HOXJEfd6LxX1U9BFB qkHZNBBy6mv6eh6MWmlJmVlhNV+3tICAsQahEcurS8aQejN/Ni00N0E30fX4lmGD45fl oyj+17jy+knX3lZlR6T6Soy1J3S57AAiNzsF8dg71aw4nB2dnPErQkdrgk89ON0LD2YE cF4lNK1VNdmuS5mIBEOqxEDe+Fm0dV38Tf1+KJBqbK5vdBoSQn7DaZ7i5C9SgprDPn7R gbrZtOC/VQWXKTZFLnPjHr1Z2GsU/OhcCzNp5dFaDc2JUTPgz1dAm3vHpqMuzXEEU3h3 JYiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ThaDTUbxt+sr6llV+NsEX4sJ//dAH98gJY/gG9rRk6g=; fh=Q3aaAfY3sac/e2MmBMzRLk2ss6stI17w+SoybUbPgM4=; b=Z2t+y7e+NawP6aYnNRjZP84vJZONFbihKq1vHjZpCVGD6TT2fqeRp1xT8TUp61Ig7V Kxkn7Nv/gyq7Rci22tFT5g2wVC27/qzDXkE1Sj4BsHLbghJHrezAWoLcfZ/WnvGnp7+A gj1T9Az3OQHAj9xOuZkmWqjpPWc0uj17IgZLfs3qbv7awOD23agbW6DBGHnXOKXrLDHv In/0OjjsuZEbXuIhXJyEx709/RS83/Snt7F65rDTiWV+S2SzlK4MAwbYDXrjiR58nvXD DN5q3dn91gUrCSOsESzc4/Lwbn1VmYF04S5JkD88U7aK6POtnA+IXkpq/8DM1oZeDzJp q1ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t18-20020a63dd12000000b0053f3d04e66csi1527794pgg.699.2023.07.27.10.19.36; Thu, 27 Jul 2023 10:19:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231600AbjG0Qsj (ORCPT + 99 others); Thu, 27 Jul 2023 12:48:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231550AbjG0Qs2 (ORCPT ); Thu, 27 Jul 2023 12:48:28 -0400 Received: from brightrain.aerifal.cx (brightrain.aerifal.cx [216.12.86.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D80DC30F0 for ; Thu, 27 Jul 2023 09:48:22 -0700 (PDT) Date: Thu, 27 Jul 2023 12:31:04 -0400 From: "dalias@libc.org" To: David Laight Cc: 'Aleksa Sarai' , Alexey Gladkov , LKML , Arnd Bergmann , "linux-api@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "viro@zeniv.linux.org.uk" , "James.Bottomley@hansenpartnership.com" , "acme@kernel.org" , "alexander.shishkin@linux.intel.com" , "axboe@kernel.dk" , "benh@kernel.crashing.org" , "borntraeger@de.ibm.com" , "bp@alien8.de" , "catalin.marinas@arm.com" , "christian@brauner.io" , "davem@davemloft.net" , "deepa.kernel@gmail.com" , "deller@gmx.de" , "dhowells@redhat.com" , "fenghua.yu@intel.com" , "fweimer@redhat.com" , "geert@linux-m68k.org" , "glebfm@altlinux.org" , "gor@linux.ibm.com" , "hare@suse.com" , "hpa@zytor.com" , "ink@jurassic.park.msu.ru" , "jhogan@kernel.org" , "kim.phillips@arm.com" , "ldv@altlinux.org" , "linux-alpha@vger.kernel.org" , "linux-arch@vger.kernel.org" , "linux-ia64@vger.kernel.org" , "linux-m68k@lists.linux-m68k.org" , "linux-mips@vger.kernel.org" , "linux-parisc@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-sh@vger.kernel.org" , "linux@armlinux.org.uk" , "linuxppc-dev@lists.ozlabs.org" , "luto@kernel.org" , "mattst88@gmail.com" , "mingo@redhat.com" , "monstr@monstr.eu" , "mpe@ellerman.id.au" , "namhyung@kernel.org" , "paulus@samba.org" , "peterz@infradead.org" , "ralf@linux-mips.org" , "sparclinux@vger.kernel.org" , "stefan@agner.ch" , "tglx@linutronix.de" , "tony.luck@intel.com" , "tycho@tycho.ws" , "will@kernel.org" , "x86@kernel.org" , "ysato@users.sourceforge.jp" , Palmer Dabbelt Subject: Re: [PATCH v4 2/5] fs: Add fchmodat2() Message-ID: <20230727163103.GB20050@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-kernel@vger.kernel.org On Thu, Jul 27, 2023 at 09:01:06AM +0000, David Laight wrote: > From: Aleksa Sarai > > Sent: 25 July 2023 17:36 > .... > > We almost certainly want to support AT_EMPTY_PATH at the same time. > > Otherwise userspace will still need to go through /proc when trying to > > chmod a file handle they have. > > That can't be allowed. > > Just because a process has a file open and write access to > the directory that contains it doesn't mean they are allowed > to change the file permissions. > > They also need directory search access from a directory > they have open through to the containing directory. Am I missing something? How is this different from fchmod? Rich