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: <Z5QlHcCErrALjWfG@slm.duckdns.org>
Date: Fri, 24 Jan 2025 13:41:17 -1000
From: Tejun Heo <tj@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
	Michal Koutný <mkoutny@...e.com>,
	"Paul E. McKenney" <paulmck@...nel.org>,
	Boqun Feng <boqun.feng@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Hillf Danton <hdanton@...a.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Marco Elver <elver@...gle.com>, Zefan Li <lizefan.x@...edance.com>,
	tglx@...utronix.de,
	syzbot+6ea37e2e6ffccf41a7e6@...kaller.appspotmail.com
Subject: Re: [PATCH v4 6/6] kernfs: Use RCU to access kernfs_node::name.

Hello,

On Fri, Jan 24, 2025 at 06:46:14PM +0100, Sebastian Andrzej Siewior wrote:
> Using RCU lifetime rules to access kernfs_node::name can avoid the
> trouble kernfs_rename_lock in kernfs_name() and kernfs_path_from_node()
> if the fs was created with KERNFS_ROOT_INVARIANT_PARENT.

Maybe explain why we want to do this?

> +static inline const char *kernfs_rcu_get_name(const struct kernfs_node *kn)
> +{
> +	return rcu_dereference_check(kn->name, kernfs_root_is_locked(kn));
> +}

Can you drop "get" from the accessors? Other accessors don't have it and it
gets confusing with reference counting operations.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ