Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1220667pxk; Thu, 10 Sep 2020 09:52:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynhtpq7OtLY4RkgI1/W88+n2Z+5vekxBtqEyJVpk3/qErQ/4u3kuMKeK55uglMRf0IxTK5 X-Received: by 2002:a17:906:915:: with SMTP id i21mr9513633ejd.113.1599756773188; Thu, 10 Sep 2020 09:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599756773; cv=none; d=google.com; s=arc-20160816; b=SAdTJhB0w23Fhn1xFtV83rkn3XZSo53e/tse/+tjh58sY6yafRMiYHl7sZYjimVbtK sKRlAayg4hraf8CEDi6WLExUiBsWCaluoeqizDbryoKc3fI6qIhkyXXOU7YWp/pe3p6S nd8kRg3KnzlzcBCWLV+fRN7svpr3p43iKADo/IQgWsKh2T6mCTuwDE5EUG2RTbUDm3/D aPfLvRPkPm2wtjsIKw3WGknUjXYezrBgITT2KHBBjW0zAEkRsTiPHspOKgRNlstcqZlA gLjpewATcuhIrqaXSC3Vmr7Z18hzWs6wdZ90CQo1TFkaA6QV+1/mvnxFMaXJDQ2bav/Q D/gA== 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=+47H5A8WVuSjFI0h3Ukcy2wKP9GdHGo5YwAsuUcoBHw=; b=TQNMXnvu8WHN3uzLBVMXyF+1glfqN5+iLGJKAI5hdIJdzZQaaQffHBp02skscTMyBt AVtpFSLg2OA5haxSX15wNCnAfYmmJ5I+eHo5oT0E8VRMBWaVSSTkZQU8dkVGxXaZp4Bp 8vHQCg+CL9MZiKV5Bhb4wx/iWfqwMDypH2fOpD7ikAo+gb7/HK40PETauQVMXkR1wXtj 7g4Mb/J/hgUk2OVzXzw60OnfgPYXXG7iFC3Ht1ltAMt+oZiwLu9+GgFOLJkGi7/4nN3V NA5bc0JyipvNb39mRBB2Nmh1pxC9w7iy5D7YVPP0IC1uWqPrGw0HIQh1Nu8kUZtsBpII 9ybA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=IZ9xQ3mR; 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 v26si1747863edd.443.2020.09.10.09.52.30; Thu, 10 Sep 2020 09:52:53 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=IZ9xQ3mR; 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 S1726676AbgIJQto (ORCPT + 99 others); Thu, 10 Sep 2020 12:49:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727027AbgIJQmh (ORCPT ); Thu, 10 Sep 2020 12:42:37 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF3BBC061573; Thu, 10 Sep 2020 09:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+47H5A8WVuSjFI0h3Ukcy2wKP9GdHGo5YwAsuUcoBHw=; b=IZ9xQ3mRAEpm+VKYGpxZ6vLdsI Y3eCN0u46t2Gtb6MN41UIrlUIVEe/inE5XiA7SYxFwTCsdqKhEGzG51DN2UEs42BT9NXMz0NIyYha Yzcdul7y9R+B8PnjyZwlXGZjmXfWEcdRSWZIBBC39OsiFXSA8JDks8HQowaJwDXdQH3t5sava4AEi ibxHvTh8fl8ZqS3nrT2k8W5z3mrMDYTgEHtZ5QLUyIk2ff828NoSYYElFfR9vUbqVhCabQ4CDjpvN qPg22j9V8tUfapO7FFSURCYeE+O5sIsrSRbtV+XrPqEyfR5WY4ytSoFjXHkuN9kWz97wUT0ZtL+gZ bkA+FgIQ==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGPec-0006Zw-Kg; Thu, 10 Sep 2020 16:42:34 +0000 Date: Thu, 10 Sep 2020 17:42:34 +0100 From: Christoph Hellwig To: Rich Felker Cc: Christoph Hellwig , 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: <20200910164234.GA25140@infradead.org> References: <20200910142335.GG3265@brightrain.aerifal.cx> <20200910162059.GA18228@infradead.org> <20200910163949.GJ3265@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910163949.GJ3265@brightrain.aerifal.cx> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html 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 12:39:50PM -0400, Rich Felker wrote: > 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. Either - we need to make sure the user can't change the permission bits. > > 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. And I'm generally supportive of that. But we need to fix the damn bug first an then do nice to haves.