From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795213214; b=M6rBDEUSnjcPRas9YA5LXQBclqLdINidPJQ2V9APj09B1mjIms2eCxiGed0uDq6BG1M6 baoH7WtMDImXXsvItl/ZVIKuXvwDLY3eik3CttrZclxT8metUarjSIZy0A//XS5eAU61k dB103ux101DIS+vPkfCLQgVnyIrGAzYgvMJ/OAbaJHgoYhvlF7Ita3lT8lNT+hAmaF636 n42fJ5oqKeoabmZ3L+QZyBbqareD34Oll9Iogud+98m7LQ0YYieMHtFP8929LC3A/jPxI hYp/nNT0Tyb+lMbpJFRTVO5Ow1VgDiEUBeMEXJsvp19IuZ9McRJx4ZVGjoOshxjP3UA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795213214; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=Aq8c5jMV6FAXyr7m5r03HEVCZDhHL41cwgsujaioS6A=; b=49EeBsijQJjAxJSBoAaRP3bK95kkOE2Iq4r+VTfn9QDQ5BTIV3xKdcEhWVFbhxA2ZWB7 bZD3n6sHJOT518wYBixXDc6oWE9XJd7S5LS8rHDiRk38lF5/waG34dmC9hgfe17ZZY9S0 iRA6n0KVo67uas8V7gnKX7uK9PYmP8XlODCKJiJV0omHW8BxQ2WWPd5vX3B/HelJ/c5Ju rONWfZzmilkK9v4EF5Aw8R6b8A4ovxaojmHvtwBiFXRSXzHTPYEL8/n1bm3GHPwsmfCdk bN0792p+Ekh9EMHBbMrGlVKqn8tZR1wHsn8sNDMIGswPWt+enpKM4GHvXfc/o/yoatA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mROE1RDF; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 498C6606A6BD; Fri, 20 Nov 2026 22:20:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mROE1RDF Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51A981F000D0; Fri, 20 Nov 2026 22:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795213213; bh=Aq8c5jMV6FAXyr7m5r03HEVCZDhHL41cwgsujaioS6A=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=mROE1RDF4XR/10ikQZwTB7UauvDH8Mr0dtNAipdw8X4FBhIUtl4UuLN1CK6fWMrvA S6GnDbxs18Gpd9S+N167jEN6pdhS1mHG16PUjB8K1WV6xmBNbQrsVM3FReCSvZ9j1P ghEnvSdOgS5O2d5+USYeir0mVGqjfa8uecN4PpOIrF1TBwSv7Mczx7RFXRcYU0tNWs Iw+TgsABMdafm2FfaPqUnqKVmigWAcpU8qcKWlnbpj2KHLKtry+JPYVirQVxnF0R8F OldD5aP2DlLdJbIkvBTArvseERJ/s2ZYpD0bpeZ9WhZ2TXWU/1YsQ6/EeqWciLHfhX B/zHscYkajU8w== Date: Fri, 20 Nov 2026 22:20:11 +0000 From: Eric Biggers To: Andrey Albershteyn Cc: fsdevel , fsverity , linux-ext4 , linux-btrfs , linux-f2fs , linux-xfs , dsterba@suse.com, Christian Brauner , tytso@mit.edu, chao@kernel.org, jaegeuk@kernel.org, viro@zeniv.linux.org.uk, Boris Burkov , Christoph Hellwig Subject: Re: [PATCH v3 2/7] fs: strip FS_VERITY_FL from FS_IOC_SETFLAGS Message-ID: <20261120222011.GC3048696@google.com> References: <20261120155032.187246-1-aalbersh@kernel.org> <20261120155032.187246-3-aalbersh@kernel.org> X-Mailing-List: fsverity@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261120155032.187246-3-aalbersh@kernel.org> On Fri, Nov 20, 2026 at 04:50:24PM +0100, Andrey Albershteyn wrote: > The common use of FS_IOC_GETFLAGS/SETFLAGS is get-modify-set loop. > Filesystems could return verity status with GETFLAGS, attempting to then > pass FS_VERITY_FL to SETFLAGS is not allowed. > > The ext4 and f2fs already treat FS_VERITY_FL in the set path as no-op, > however, BTRFS returns -EOPNOTSUPP. So, the modification of other flags > doesn't work on BTRFS for fsverity inodes. > > Fix it for BTRFS and anyone else, the ext4 and f2fs masking becomes > no-op. The file_get/setattr() path is fine here as this flag is cleared > right before fileattr_set_prepare(). The future fsverity support in XFS > would also need it. The commit message should explicitly state that this changes behavior not just in the get-modify-set case on btrfs, but also makes FS_VERITY_FL be silently ignored if it's attempted to be set on a file that didn't have it before. I guess that behavior is okay since ext4 and f2fs do that, but we should be intentional about it. - Eric From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1A51606A33F for ; Fri, 20 Nov 2026 22:20:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lists.sourceforge.net header.i=@lists.sourceforge.net header.a=rsa-sha256 header.s=beta header.b=ctr03BlS; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.a=rsa-sha256 header.s=x header.b=HTqGcdI/; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.a=rsa-sha256 header.s=x header.b=BgjObbVP; dkim=neutral header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=mROE1RDF DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:MIME-Version:References: Message-ID:To:Date:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=7wkS84BFDCEy9VxBgobw6bUGCRymnp+wfJlM3Ko1ybU=; b=ctr03BlSm3zZoRysb6QEPuVNUo +5VXnZ0BIKMwweXTKgoRtmRbcZh1yi964aTV2lkJz1atMZ8kbFlY2nCz/nY/tk0pCdO3YxxoooyT/ SqvHeh0h3qZkPT9xID5nrqRNbZwfEnbgnn4SXPvi+yci8jQm5ZY4MiJnkma2640sh17I=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xUWxx-000000004px-1v6i; Fri, 20 Nov 2026 22:20:21 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xUWxw-000000004pr-0isx for linux-f2fs-devel@lists.sourceforge.net; Fri, 20 Nov 2026 22:20:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; 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:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Aq8c5jMV6FAXyr7m5r03HEVCZDhHL41cwgsujaioS6A=; b=HTqGcdI/uzFmxs40v2yNx9wWrr SYbH4ndHxA6iaufzsuHpat2Ij3dfpx9gv1GG1pJwn/zUB3/yuWxkzCaspLDaBXunuMHwkb7WnQNX0 56cQlv73j+EOELnAZFjRaYNYfTLPM8tgIHyUOQv8oALDGjz/GQRBVKFgxqMHILNA7muw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; 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:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Aq8c5jMV6FAXyr7m5r03HEVCZDhHL41cwgsujaioS6A=; b=BgjObbVPVAsHjRd98Oqbr7+K69 BhWbcaLrNPI0KNNK+tzxd5pw9yidfyQTLrScR/oAvUXZNhMzgVxkuXEjDaMZ53k2Pz+ngM8hOeh0k 7oJMMgK0I70Q9nRx28UCMgf0Q3C6KzKh6bg0DopXtYPQ41mDCPVWKUGFdqgkxIanIyQ8=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xUWxv-000000003Lo-3E8l for linux-f2fs-devel@lists.sourceforge.net; Fri, 20 Nov 2026 22:20:20 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 30D34624F4; Fri, 20 Nov 2026 22:20:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51A981F000D0; Fri, 20 Nov 2026 22:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795213213; bh=Aq8c5jMV6FAXyr7m5r03HEVCZDhHL41cwgsujaioS6A=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=mROE1RDF4XR/10ikQZwTB7UauvDH8Mr0dtNAipdw8X4FBhIUtl4UuLN1CK6fWMrvA S6GnDbxs18Gpd9S+N167jEN6pdhS1mHG16PUjB8K1WV6xmBNbQrsVM3FReCSvZ9j1P ghEnvSdOgS5O2d5+USYeir0mVGqjfa8uecN4PpOIrF1TBwSv7Mczx7RFXRcYU0tNWs Iw+TgsABMdafm2FfaPqUnqKVmigWAcpU8qcKWlnbpj2KHLKtry+JPYVirQVxnF0R8F OldD5aP2DlLdJbIkvBTArvseERJ/s2ZYpD0bpeZ9WhZ2TXWU/1YsQ6/EeqWciLHfhX B/zHscYkajU8w== Date: Fri, 20 Nov 2026 22:20:11 +0000 To: Andrey Albershteyn Message-ID: <20261120222011.GC3048696@google.com> References: <20261120155032.187246-1-aalbersh@kernel.org> <20261120155032.187246-3-aalbersh@kernel.org> X-Archived-By: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20261120155032.187246-3-aalbersh@kernel.org> X-Spam-Score: -0.2 (/) X-Headers-End: 1xUWxv-000000003Lo-3E8l Subject: Re: [f2fs-dev] [PATCH v3 2/7] fs: strip FS_VERITY_FL from FS_IOC_SETFLAGS X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , From: Eric Biggers via Linux-f2fs-devel Reply-To: Eric Biggers Cc: fsverity , Christian Brauner , tytso@mit.edu, linux-f2fs , linux-xfs , dsterba@suse.com, viro@zeniv.linux.org.uk, fsdevel , jaegeuk@kernel.org, linux-ext4 , Boris Burkov , Christoph Hellwig , linux-btrfs Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Fri, Nov 20, 2026 at 04:50:24PM +0100, Andrey Albershteyn wrote: > The common use of FS_IOC_GETFLAGS/SETFLAGS is get-modify-set loop. > Filesystems could return verity status with GETFLAGS, attempting to then > pass FS_VERITY_FL to SETFLAGS is not allowed. > > The ext4 and f2fs already treat FS_VERITY_FL in the set path as no-op, > however, BTRFS returns -EOPNOTSUPP. So, the modification of other flags > doesn't work on BTRFS for fsverity inodes. > > Fix it for BTRFS and anyone else, the ext4 and f2fs masking becomes > no-op. The file_get/setattr() path is fine here as this flag is cleared > right before fileattr_set_prepare(). The future fsverity support in XFS > would also need it. The commit message should explicitly state that this changes behavior not just in the get-modify-set case on btrfs, but also makes FS_VERITY_FL be silently ignored if it's attempted to be set on a file that didn't have it before. I guess that behavior is okay since ext4 and f2fs do that, but we should be intentional about it. - Eric _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel