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: <CAGudoHFU7F07kavPxpEo7dxF1aWofu2i1xK_FENFhCRawK0s4g@mail.gmail.com>
Date: Mon, 6 Oct 2025 14:20:25 +0200
From: Mateusz Guzik <mjguzik@...il.com>
To: Jan Kara <jack@...e.cz>
Cc: 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, 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ