Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp231138ybi; Tue, 16 Jul 2019 19:42:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxAm/eT4CMeqiKQRD4nglF629VbYBn3BdxqCOxZu4pwBUZHDZaQ2jxscB4HAco5CSkVUws X-Received: by 2002:a63:8f55:: with SMTP id r21mr37354459pgn.318.1563331326891; Tue, 16 Jul 2019 19:42:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563331326; cv=none; d=google.com; s=arc-20160816; b=uFIUbDsjn7RgpWKdtW7vifTyFSFR1zXehUnyIbZAfSfo+P866nCt67ih0RgwQX9ZnZ NiK+Cvq0EMg4v0OaLci4XRfmQoR566hRSh7Ariac2fvFcK1keoK5XV4NJ2jHyPWDBO4c bmzFZ2mGIZ+jtes/9M83g3Drdv6nmNXVtQjJd9XkBVc0X8Zp+NDY+8kG/09/axd3xP7x XK+2pYZEYWmhOhOps1raXb/3Vf4dJj7FamAFJbNPVU9OZsJs64ci4jPrgzSRKT6jdSJr dp+w24wnUqUgsK5blob8DvOTQoCi8HA7WVuX+cVXAbcS6jTdKQJIKRiOajGTb+6T59GY jHpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+BZkz8PQjMdc9COgM0BUYVFhTLsBMdpn1OTwDOWgQpU=; b=EvRwT0rnPZUv/hDB1dkspP7gOHMUz4pqBNLoylX+/I7Jmcxc5eBvzjo82qpnHan2rc SNQPpGITgr4lXT2+HxshdnC9yUCLMjpzyGmd2zYJI7mhQsEeSjhlMwmaEjOaytvFiyZW 6mWmXYbJbOBkRz90g+vWZx06btg3XTSW8j7wx2h9rfbOg2w39UrTYy9YlRKSnAAv11j5 ekor2U9w3ghyPEeu6I5H8B9T+jgb8UKnLv9aA/Ajbwqi5nUtMul5+Vrtpg/575WmYrwt /GF+ZfYHSblLWeuhhMsz2IIUUqoDj04/rc2xpFjBNhoEPUeLYhmz3Zjv8zPgG7eJBSE3 0dyA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15si21238347pgn.178.2019.07.16.19.41.49; Tue, 16 Jul 2019 19:42:06 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727778AbfGQCl0 (ORCPT + 99 others); Tue, 16 Jul 2019 22:41:26 -0400 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:39154 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbfGQClZ (ORCPT ); Tue, 16 Jul 2019 22:41:25 -0400 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1hnZs6-0002cE-00; Wed, 17 Jul 2019 02:40:46 +0000 Date: Tue, 16 Jul 2019 22:40:46 -0400 From: Rich Felker To: Palmer Dabbelt Cc: viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, tony.luck@intel.com, fenghua.yu@intel.com, geert@linux-m68k.org, monstr@monstr.eu, ralf@linux-mips.org, paul.burton@mips.com, jhogan@kernel.org, James.Bottomley@HansenPartnership.com, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, heiko.carstens@de.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com, ysato@users.sourceforge.jp, davem@davemloft.net, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org, peterz@infradead.org, acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, dhowells@redhat.com, firoz.khan@linaro.org, stefan@agner.ch, schwidefsky@de.ibm.com, axboe@kernel.dk, christian@brauner.io, hare@suse.com, deepa.kernel@gmail.com, tycho@tycho.ws, kim.phillips@arm.com, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH v2 2/4] Add fchmodat4(), a new syscall Message-ID: <20190717024046.GI1506@brightrain.aerifal.cx> References: <20190717012719.5524-1-palmer@sifive.com> <20190717012719.5524-3-palmer@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190717012719.5524-3-palmer@sifive.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 16, 2019 at 06:27:17PM -0700, Palmer Dabbelt wrote: > man 3p says that fchmodat() takes a flags argument, but the Linux > syscall does not. There doesn't appear to be a good userspace > workaround for this issue but the implementation in the kernel is pretty > straight-forward. The specific use case where the missing flags came up > was WRT a fuse filesystem implemenation, but the functionality is pretty > generic so I'm assuming there would be other use cases. Note that we do have a workaround in musl libc with O_PATH and /proc/self/fd, but a syscall that allows a proper fix with the ugly workaround only in the fallback path for old kernels will be much appreciated! What about also doing a new SYS_faccessat4 with working AT_EACCESS flag? The workaround we have to do for it is far worse. Rich