lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <v2bklzsfbqerlpbuqb5yjk66h2yldoxjfauixu5amlyfi3ayfg@fd5zqbptgbmv>
Date: Mon, 6 Oct 2025 14:32:14 +0200
From: Jan Kara <jack@...e.cz>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: Jan Kara <jack@...e.cz>, brauner@...nel.org, viro@...iv.linux.org.uk, 
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] fs: add missing fences to I_NEW handling

On Mon 06-10-25 14:20:25, Mateusz Guzik wrote:
> On Mon, Oct 6, 2025 at 2:15 PM Jan Kara <jack@...e.cz> wrote:
> >
> > On Mon 06-10-25 01:15:26, Mateusz Guzik wrote:
> > > diff --git a/include/linux/writeback.h b/include/linux/writeback.h
> > > index 22dd4adc5667..e1e1231a6830 100644
> > > --- a/include/linux/writeback.h
> > > +++ b/include/linux/writeback.h
> > > @@ -194,6 +194,10 @@ static inline void wait_on_inode(struct inode *inode)
> > >  {
> > >       wait_var_event(inode_state_wait_address(inode, __I_NEW),
> > >                      !(READ_ONCE(inode->i_state) & I_NEW));
> > > +     /*
> > > +      * Pairs with routines clearing I_NEW.
> > > +      */
> > > +     smp_rmb();
> >
> > ... smp_load_acquire() instead if READ_ONCE? That would seem like a more
> > "modern" way to fix this?
> >
> 
> Now that the merge window flurry has died down I'll be posting an
> updated i_state accessor patchset.
> 
> Then I would need to add inode_state_read_once_acquire() and
> inode_state_clear_release() to keep up with this.
> 
> I figured I'll spare it for the time being, worst case can be added later.
> 
> That aside I have a wip patch to not require fences here and instead
> take advantage of the i_lock held earlier, so I expect this to go away
> anyway.

Fair enough, I was just wondering :). Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ