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: <20250915-tricksen-militant-406d4cb8ebda@brauner>
Date: Mon, 15 Sep 2025 15:41:02 +0200
From: Christian Brauner <brauner@...nel.org>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: viro@...iv.linux.org.uk, jack@...e.cz, linux-kernel@...r.kernel.org, 
	linux-fsdevel@...r.kernel.org, josef@...icpanda.com, kernel-team@...com, amir73il@...il.com, 
	linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org, 
	ocfs2-devel@...ts.linux.dev
Subject: Re: [PATCH v3 2/4] fs: hide ->i_state handling behind accessors

On Mon, Sep 15, 2025 at 03:27:16PM +0200, Mateusz Guzik wrote:
> On Mon, Sep 15, 2025 at 2:41 PM Christian Brauner <brauner@...nel.org> wrote:
> >
> > On Thu, Sep 11, 2025 at 06:55:55AM +0200, Mateusz Guzik wrote:
> > > Signed-off-by: Mateusz Guzik <mjguzik@...il.com>
> > > ---
> >
> > I would do:
> >
> > inode_state()
> > inode_state_raw()
> >
> > Similar to
> >
> > rcu_derefence()
> > rcu_dereference_raw()
> >
> 
> I don't follow how to fit this in here.
> 
> Here is the complete list:
> inode_state_read
> inode_state_read_unstable
> 
> first is a plain read + lockdep assert, second is a READ_ONCE
> 
> inode_state_add
> inode_state_add_unchecked
> inode_state_del
> inode_state_del_unchecked
> inode_state_set_unchecked
> 
> Routine with _unchecked forego asserts, otherwise the op checks lockdep.
> 
> I guess _unchecked could be _raw, but I don't see how to fit this into
> the read thing.

_raw() is adapted from rcu which is why I'm very familiar with what it
means: rcu_dereference() performs checks and rcu_dereference_raw()
doesn't. It's just a naming convention that we already have and are
accustomed to.

> 
> Can you just spell out the names you want for all of these?

just use _raw() imho

> 
> > But you need some actual commit messages etc...
> >
> 
> Ye and I need to runtime test at least with xfs and btrfs.

Something I plan to do soon is more automated testing as soon as patch
series are pulled into one of the VFS trees. And by that I mean visible
to the author of the series. It'll be a while though unless we get
manpower for that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ