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] [day] [month] [year] [list]
Message-ID: <20250211075659.aRpNJSdP@linutronix.de>
Date: Tue, 11 Feb 2025 08:56:59 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Yonghong Song <yonghong.song@...ux.dev>
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>, Tejun Heo <tj@...nel.org>,
	tglx@...utronix.de, Andrii Nakryiko <andrii@...nel.org>,
	Eduard Zingerman <eddyz87@...il.com>,
	Mykola Lysenko <mykolal@...com>, bpf@...r.kernel.org
Subject: Re: [PATCH v7 5/6] kernfs: Use RCU to access kernfs_node::parent.

On 2025-02-10 08:41:00 [-0800], Yonghong Song wrote:
> > diff --git a/tools/testing/selftests/bpf/progs/profiler.inc.h b/tools/testing/selftests/bpf/progs/profiler.inc.h
> > index 8bd1ebd7d6afd..a4f518ee5f4de 100644
> > --- a/tools/testing/selftests/bpf/progs/profiler.inc.h
> > +++ b/tools/testing/selftests/bpf/progs/profiler.inc.h
> > @@ -223,7 +223,7 @@ static INLINE void* read_full_cgroup_path(struct kernfs_node* cgroup_node,
> >   		if (bpf_cmp_likely(filepart_length, <=, MAX_PATH)) {
> >   			payload += filepart_length;
> >   		}
> > -		cgroup_node = BPF_CORE_READ(cgroup_node, parent);
> > +		cgroup_node = BPF_CORE_READ(cgroup_node, __parent);
> >   	}
> >   	return payload;
> >   }
> > @@ -323,6 +324,7 @@ static INLINE void* populate_cgroup_info(struct cgroup_data_t* cgroup_data,
> >   		cgroup_data->cgroup_full_length = payload_end_pos - payload;
> >   		payload = payload_end_pos;
> >   	}
> > +	bpf_rcu_read_unlock();
> 
> All programs calling this function populate_cgroup_info() is not sleepable program
> so the whole prog is protected by rcu and there is no need for above
> bpf_rcu_read_{lock,unlock}().

Understood. So just the rename then.

> >   	return (void*)payload;
> >   }

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ