From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EA17EB64DD for ; Thu, 13 Jul 2023 12:00:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233139AbjGMMAw (ORCPT ); Thu, 13 Jul 2023 08:00:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234531AbjGMMAu (ORCPT ); Thu, 13 Jul 2023 08:00:50 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4F0A1FC9; Thu, 13 Jul 2023 05:00:47 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 84E3C6732D; Thu, 13 Jul 2023 14:00:43 +0200 (CEST) Date: Thu, 13 Jul 2023 14:00:42 +0200 From: Christoph Hellwig To: Christian Brauner Cc: Linus Torvalds , Christoph Hellwig , Florian Weimer , Aleksa Sarai , linux-fsdevel@vger.kernel.org, Al Viro , stable@vger.kernel.org Subject: Re: [PATCH v2] attr: block mode changes of symlinks Message-ID: <20230713120042.GA23709@lst.de> References: <20230712-vfs-chmod-symlinks-v2-1-08cfb92b61dd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230712-vfs-chmod-symlinks-v2-1-08cfb92b61dd@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Jul 12, 2023 at 08:58:49PM +0200, Christian Brauner wrote: > (1) Filesystems that don't implement a i_op->setattr() for symlinks. > > Such filesystems may or may not know that without i_op->setattr() > defined, notify_change() falls back to simple_setattr() causing the > inode's mode in the inode cache to be changed. Btw, I think this fallback is pretty harmful. At some point we should probably start auditing all instances and wire the ones up that should be using simple_setattr (probably mostly just in-memory file systems) and refuse attribute changes if .setattr is NULL.