Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1215318pxk; Thu, 10 Sep 2020 09:44:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwj3nOdSb3G8/bDrXk2aIoNBiYKCBJC6Bpr3CA03xDdaJ2pVuC45o2apx2A1awVjhcTuxEf X-Received: by 2002:a17:906:bb0e:: with SMTP id jz14mr10170388ejb.525.1599756266302; Thu, 10 Sep 2020 09:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599756266; cv=none; d=google.com; s=arc-20160816; b=RdIZIXYZ/93EP2iPfaHn59qIHHIqMTw4Cckf2THwWsHqNapzAA6XFL97vz08Xn8oS3 CgYaDOVVJjPTPcx8GtHV/8v7jQ03VHKw+UwCp1Ilk18Hb8TWdKM5w504p6qrtCoKSa7k ah3AJI1AjGJL4nxQnwIfKjpOCuleGOSe8CGSorrYSUQf9oVFwqgsXXtGTMfdKU2gUg2J K2zKfcydJC4MsxGVtp3bpRuA/VtuWDkLlKHLethjumEpJK/lUGT8jLMnnvKYV8e24bza QE6vCRJBQVoS6FfyPJmtwGjQnQo90KJH4GLD1/QKxgSe8JvPSU0jkZSkBlLTsPfQYsDe NMZQ== 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=+aTIdagyZoRIBNCOkikpLBACFgMTAuq7EVwxj3R4k5M=; b=Wb/YCYz0ipOxXHZxa5oL+P8qMsW0VNYFteboyM0pqWdaYVE3Neju7RnEU7qt4pxiZ4 oWxM5BXQzfAJeth65TitF5WuZQ53ZfYUssYKuse2kKfsBqzCvcTJrKF0Jdd05MDTlnL9 rWoSjK1FxOl0Dp9+g3HIMOal9rogQjgWBaw8YLVXnpT1w2/ch5UA+x5qnN2B2JgrvwI0 nOApa35/+KQUUbepG/t3gAWOK7BUWR7ZWjmTR177QlKTeJ1af1wwdSU0sOdyRYgiEYS8 IPEbWAzmOaT+W/hGQBuvtUWJejwIeqkO7i3skUJlRGKvqxix8BUuVSVP6S9cxO3jEWUV Gouw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e8si3843654ejj.575.2020.09.10.09.44.03; Thu, 10 Sep 2020 09:44:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727052AbgIJQmr (ORCPT + 99 others); Thu, 10 Sep 2020 12:42:47 -0400 Received: from brightrain.aerifal.cx ([216.12.86.13]:52470 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727066AbgIJQjw (ORCPT ); Thu, 10 Sep 2020 12:39:52 -0400 Date: Thu, 10 Sep 2020 12:39:50 -0400 From: Rich Felker To: Christoph Hellwig Cc: linux-api@vger.kernel.org, Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vfs: add fchmodat2 syscall Message-ID: <20200910163949.GJ3265@brightrain.aerifal.cx> References: <20200910142335.GG3265@brightrain.aerifal.cx> <20200910162059.GA18228@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910162059.GA18228@infradead.org> 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 Thu, Sep 10, 2020 at 05:20:59PM +0100, Christoph Hellwig wrote: > On Thu, Sep 10, 2020 at 10:23:37AM -0400, Rich Felker wrote: > > userspace emulation done in libc implementations. No change is made to > > the underlying chmod_common(), so it's still possible to attempt > > changes via procfs, if desired. > > And that is the goddamn problem. We need to fix that _first_. Can you clarify exactly what that is? Do you mean fixing the underlying fs backends, or just ensuring that the chmod for symlinks doesn't reach them by putting the check in chmod_common? I'm ok with any of these. > After that we can add sugarcoating using new syscalls if needed. The new syscall is _not_ about this problem. It's about the missing flags argument and inability to implement fchmodat() without access to procfs. The above problem is just something you encounter and have to make a decision about in order to fix the missing flags problem and make a working AT_SYMLINK_NOFOLLOW. Rich