From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EB34224240; Sun, 25 Jan 2026 21:48:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769377714; cv=none; b=LQ4yF7zz9w1PAaNI5wH0/Bo+9FOhzrYs+qWV7z4G877Qnqb0lS0aLiuLTAsBUuRofroAdDrAoOOgy/7mpcIX3KSAJWyDhPFIjw/FzXT8nlRu7ywY2XOaYRGIGoKZPSE/I6nfpdJq6SouU+DPwaLNedyXNmWecR5vGE3d6mfnTEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769377714; c=relaxed/simple; bh=dVblczFOT3KK64ywz5l+aXQv3RLrX2RoBjFt0kny0a8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZtYpqOlsJ+oIqczEAEfgipQ5P62mh66nTdor8cE+GpmjCb9gBH6cNBLZdwLrihTj5wnF5j9J6SL8Gml7163eMy2kGlYyaEKkaB/Py8xEdxWyvYj51mkvd0tvr2YuKPSJBlb8T0Bo7lOCO9vQt86J2zsgYWl76AX1H4Z8uSmIrYw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=e5UblH7z; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="e5UblH7z" 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=quPIaL6J4vgskyL8jbt0HEBw7S9sSjdcy/gh2a5f1k4=; b=e5UblH7z5/IjdAKi22YkrU/R70 RpKHo3fZ71OVhhLv/oYJcW70xMU/N3QMFRSrTRoQ9NeI+QbCHXH6TZFSTz7yN+zkprWYk2wCe/zb3 WX/cZTCUAglWH3fuxkJxwIsSo1ygzzq8aILKQhkTwvQIZa0Gs44VH3lUCouxwoEMoc1LE24FR4KWG fJMxm+deBt8KWp6yJWvwdt80mv2jzq+ZxWiF2/cKu3t4q9ZP9O5fMu/JhZ+INTwx0ZWaHrytz8VhQ dRyMWcchY40sPMrTdfnDW2tPwobxN98aqvOeIbVBJ6KjknVfCVzvDeD2O4zCb58CWO3yMSzyMePbg j2CpBSzw==; Received: from willy by casper.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vk7y2-00000004zbi-1ua8; Sun, 25 Jan 2026 21:48:22 +0000 Date: Sun, 25 Jan 2026 21:48:22 +0000 From: Matthew Wilcox To: Eric Biggers Cc: Christoph Hellwig , Al Viro , Christian Brauner , Jan Kara , David Sterba , Theodore Ts'o , Jaegeuk Kim , Chao Yu , Andrey Albershteyn , linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, fsverity@lists.linux.dev Subject: Re: [PATCH 11/11] fsverity: use a hashtable to find the fsverity_info Message-ID: References: <20260122082214.452153-1-hch@lst.de> <20260122082214.452153-12-hch@lst.de> <20260125013104.GA2255@sol> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260125013104.GA2255@sol> On Sat, Jan 24, 2026 at 05:31:04PM -0800, Eric Biggers wrote: > Maybe do: > > if (IS_ENABLED(CONFIG_FS_VERITY) && IS_VERITY(inode)) { > /* > * This pairs with the try_cmpxchg in set_mask_bits() > * used to set the S_VERITY bit in i_flags. > */ > smp_mb(); > return true; > } Is there a reason not to do as DAX did: +++ b/include/linux/fs.h @@ -2119,7 +2119,11 @@ extern loff_t vfs_dedupe_file_range_one(struct file *src_file, loff_t src_pos, #endif #define S_ENCRYPTED (1 << 14) /* Encrypted file (using fs/crypto/) */ #define S_CASEFOLD (1 << 15) /* Casefolded file */ +#ifdef CONFIG_FS_VERITY #define S_VERITY (1 << 16) /* Verity file (using fs/verity/) */ +#else +#define S_VERITY 0 /* Make all the verity checks disappear */ +#endif #define S_KERNEL_FILE (1 << 17) /* File is in use by the kernel (eg. fs/cachefiles) */ #define S_ANON_INODE (1 << 19) /* Inode is an anonymous inode */ and then we can drop the CONFIG_FS_VERITY check here and in (at leaast) three other places