[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260128033519.GB30830@lst.de>
Date: Wed, 28 Jan 2026 04:35:19 +0100
From: Christoph Hellwig <hch@....de>
To: Eric Biggers <ebiggers@...nel.org>
Cc: Christoph Hellwig <hch@....de>, Al Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
David Sterba <dsterba@...e.com>, Theodore Ts'o <tytso@....edu>,
Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <chao@...nel.org>,
Andrey Albershteyn <aalbersh@...hat.com>,
Matthew Wilcox <willy@...radead.org>, linux-fsdevel@...r.kernel.org,
linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net, fsverity@...ts.linux.dev
Subject: Re: [PATCH 16/16] fsverity: use a hashtable to find the
fsverity_info
On Tue, Jan 27, 2026 at 07:28:17PM -0800, Eric Biggers wrote:
> > - * a race condition where the file is being read concurrently with
> > - * FS_IOC_ENABLE_VERITY completing. (S_VERITY is set before the verity info.)
> > + * This checks whether the inode's verity info has been set, and reads need
> > + * to verify the verity information.
>
> Nit: the point is to verify the file's data, not to verify "the verity
> information".
Ok.
> > -static inline bool fsverity_active(const struct inode *inode)
> > +static __always_inline bool fsverity_active(const struct inode *inode)
> > +{
> > + 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;
> > + }
> > +
> > + return false;
> > +}
>
> Is there a reason for this function in particular to be __always_inline?
> fsverity_get_info() is just inline.
Without the __always_inline some gcc versions on sparc fail to inline it,
and cause a link failure due to a reference to fsverity_readahead in
f2fs_mpage_readpages for non-verity builds. (reported by the buildbot)
>
> - Eric
---end quoted text---
Powered by blists - more mailing lists