Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2127406rwb; Thu, 27 Jul 2023 02:26:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlHgDuAXRGnDidhPRkx/SqhGVz4Ftj+fJMEGpsWXqFhcVJj9HXq3FuhwlK4nOMd2Mvngh8dA X-Received: by 2002:a17:906:7696:b0:992:6064:f32b with SMTP id o22-20020a170906769600b009926064f32bmr1389754ejm.46.1690449988762; Thu, 27 Jul 2023 02:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690449988; cv=none; d=google.com; s=arc-20160816; b=gef6nyqjwCy3hPC1nQHJ3d5VCgLwyov92yx9N+jeVvsUyE3OPRNVtU7xFzlTj6dGT0 0T0A6c0Hdyn2KDAL1aVI29AM0eQMmkmxpX10sYIrb29QRjt0Vv8Nfgl0fYXl8Ps+TLVa l+ITXOWjkiPNheWM/Z4nKuyXZXHRu0Gtd+soCY/loxfrLPfaYLDT1yT/CePLHZYQAVSK BvunS2nCX2QHOtmJDHpVznCxyXEK9gaKQiIMHj24dNrzk4LB4tj8o3cfN/JPTicPr8w2 lYfilOOaVTtGjoQb+4K6ffzwx5fRFNg967ubDGanJZt9/QqYi26lRTo7pjnE8A8lLPkp Wyew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=hWweMQ6d6H0yzAN99kO08eIYVKdJA9cnUux4KrZFV8M=; fh=1ihIjx8Ss6X9VnxrVoJPLG8PLBqnUuF1sgANIlENvSw=; b=BiihWs+B1bvPuWAiLv5UBElmpmakyf3onCWtiMcV2MjUjDX50xJ0KslgDX1o/qcFAE kw76dUZsvsRhChWgNCF7fXeMIC6oSE/VtOnMfzX4w1Khhwr60sApgvAGt7sBYOWaX2TX MJn+j1Ivf9PiLO3SP8lbdoTfPz5TPBkUEHpU/KCOsrJp93Xto2C8jDVrmnu6scYN+XAu YoPem88EVWSfHriiIyG0Hup0ZyOzz9NTNreA10ZKYFm9eOltZU81KNIscWSFsUMkahmp n+Ei96HgiSwSRen75Ld5a5W/W4DekIwfWeUneChpLFCc0a+0T24SMMDE+lUdQVWVmDSo Ed/w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n9-20020a170906688900b0099bcfd32960si712114ejr.161.2023.07.27.02.26.04; Thu, 27 Jul 2023 02:26:28 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232688AbjG0JNg convert rfc822-to-8bit (ORCPT + 99 others); Thu, 27 Jul 2023 05:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234133AbjG0JNF (ORCPT ); Thu, 27 Jul 2023 05:13:05 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE4497ABD for ; Thu, 27 Jul 2023 02:01:15 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-59-jWjmQDvBMMi6NLEiZstNIw-1; Thu, 27 Jul 2023 10:01:12 +0100 X-MC-Unique: jWjmQDvBMMi6NLEiZstNIw-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 27 Jul 2023 10:01:06 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Thu, 27 Jul 2023 10:01:06 +0100 From: David Laight To: 'Aleksa Sarai' , Alexey Gladkov CC: 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" , "dalias@libc.org" , "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() Thread-Topic: [PATCH v4 2/5] fs: Add fchmodat2() Thread-Index: AQHZvxZDeKGBJJpK+0qJRy2agWp2qK/NUtoA Date: Thu, 27 Jul 2023 09:01:06 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 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. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)