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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA7F3D46C0A for ; Wed, 28 Jan 2026 22:14:54 +0000 (UTC) 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-Owner; bh=ORA0q+QTtrvaHtLTNt/vuS6nfUnHt7iUFZwND5beQvU=; b=DgirocEVblKN2KFj5INyaYM+Gu HnqxWVulOkWRlvKjhrpOemkVqSGEWVWmIxLRPiVQMOLALxMxbVS+33V8s7hqNdJKjc9KcIdI01ZDS h7Kr0C5xtZe/quwzdeAkJGpTuNmlj4mQi9Ytj6z5ouXn6zkkRAwPbPjo4rVhnaX3dQnI=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vlDoL-0000bY-Ay; Wed, 28 Jan 2026 22:14:53 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vlDoK-0000bS-1V for linux-f2fs-devel@lists.sourceforge.net; Wed, 28 Jan 2026 22:14:52 +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-Subscribe:List-Post:List-Owner:List-Archive; bh=FLyJYted8TLcWVoZYFNxR6fzatHs+U7RFueAINe9KBI=; b=HtHTVsfp0xE2hFCRZsJ5sn2oK9 0bRfPh/BNg+V0fXRo7HJWnKqurvm+kTY9ffO1rd/lHFY89qUavFRluODBk/cfKF44wE9qcYahbk1f OoSwupozEBzkF0e5m5gN/Hw0Rm4XcSjKi7iAQIeYObTvPpsJArs7xVHkzj8p1B1ekquo=; 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-Subscribe: List-Post:List-Owner:List-Archive; bh=FLyJYted8TLcWVoZYFNxR6fzatHs+U7RFueAINe9KBI=; b=R5JVeZdq6KV6Jg++ORnedmUF3G zbnt665Te88nVsvIIOn+EP3KcyOaSW7quDn+CIjEtBhXEEquyZQxnIAjfc1+ZsitSWO+jz1aV/6ks oW22xg29kaQQa9s6cLRwMokUrVw7GuAoM9YuJzdR0uMYgYbjHRkBBhED9cTdPUKtgmvg=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1vlDoJ-0004zT-Ka for linux-f2fs-devel@lists.sourceforge.net; Wed, 28 Jan 2026 22:14:51 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 064186001A; Wed, 28 Jan 2026 22:14:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DF25C4CEF1; Wed, 28 Jan 2026 22:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769638485; bh=74NOxbKqGkEgjNrHB91dvQmAkyTNGiv+n72fcNGKqZY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g6V+2AmGSx+O4xRcfzdNK367XLC6Zd1kGT9QPvZRs642jJUgA3AMa1pI1xMIBSBG3 l+R+OdGNtO35Yov9kFCv05zeeG4fFH3W1L9CJpg+79lorbczT4eHx+1oZlDSO3ZC4F 7lDNpTmb6whN9LQPIVYFn7DAqwG3+qvzJV/eBZZdAqCh9Hqm64b8BJIF2JY6klONmw 0J5SzHz2OYjPOQrBnHWRWU1iA17VZOQW8mKbREoWMggJgLTebM/cmrUO8VX3MRd/IW XPyabvb/HQw/RRTsLjV0aeme/1rI65VVQnnVgp2JOlGnsS0EIBdmDMLkPvxVYHXkgz Md+xlyZQrnDkQ== Date: Wed, 28 Jan 2026 14:14:43 -0800 To: Matthew Wilcox Message-ID: <20260128221443.GA2024@quark> References: <20260122082214.452153-1-hch@lst.de> <20260122082214.452153-12-hch@lst.de> <20260125013104.GA2255@sol> <20260126044432.GE30803@lst.de> <20260126201206.GA30838@quark> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1vlDoJ-0004zT-Ka Subject: Re: [f2fs-dev] [PATCH 11/11] fsverity: use a hashtable to find the fsverity_info X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eric Biggers via Linux-f2fs-devel Reply-To: Eric Biggers Cc: fsverity@lists.linux.dev, Christian Brauner , Theodore Ts'o , Andrey Albershteyn , linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, Al Viro , Jaegeuk Kim , David Sterba , Jan Kara , linux-ext4@vger.kernel.org, Christoph Hellwig , linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Wed, Jan 28, 2026 at 09:38:53PM +0000, Matthew Wilcox wrote: > On Mon, Jan 26, 2026 at 12:12:06PM -0800, Eric Biggers wrote: > > When CONFIG_FS_VERITY=n, there can still be inodes that have fsverity > > enabled, since they might have already been present on the filesystem. > > The S_VERITY flag and the corresponding IS_VERITY() macro are being used > > to identify such inodes and handle them appropriately. > > > > Consider fsverity_file_open() for example: > > > > static inline int fsverity_file_open(struct inode *inode, struct file *filp) > > { > > if (IS_VERITY(inode)) > > return __fsverity_file_open(inode, filp); > > return 0; > > } > > > > When CONFIG_FS_VERITY=n, __fsverity_file_open() resolves to the stub: > > > > static inline int __fsverity_file_open(struct inode *inode, struct file *filp) > > { > > return -EOPNOTSUPP; > > } > > > > So the result is that on a kernel that doesn't have fsverity support > > enabled, trying to open an fsverity file fails with EOPNOTSUPP. > > ... why? If the user has built a kernel without VERITY support enabled, > they're no longer allowed to open files with verity metadata? I can't > see the harm in allowing them to read these files, they're just not > protected against these files being corrupted. Reading could be allowed, in principle. But open and truncate would still need to deny writes, and the code to do that uses IS_VERITY(). So it still wouldn't allow S_VERITY to be defined to 0, unless these checks were updated to use the filesystem-specific flags as I mentioned. - Eric _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel