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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aQNjmD6hh8rhaACb@x1>
Date: Thu, 30 Oct 2025 10:09:44 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Suzuki K Poulose <suzuki.poulose@....com>,
	Mike Leach <mike.leach@...aro.org>,
	James Clark <james.clark@...aro.org>,
	John Garry <john.g.garry@...cle.com>, Will Deacon <will@...nel.org>,
	Leo Yan <leo.yan@...ux.dev>, Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Charlie Jenkins <charlie@...osinc.com>,
	Thomas Falcon <thomas.falcon@...el.com>,
	Yicong Yang <yangyicong@...ilicon.com>,
	Thomas Richter <tmricht@...ux.ibm.com>,
	Athira Rajeev <atrajeev@...ux.ibm.com>,
	Howard Chu <howardchu95@...il.com>, Song Liu <song@...nel.org>,
	Dapeng Mi <dapeng1.mi@...ux.intel.com>,
	Levi Yun <yeoreum.yun@....com>,
	Zhongqiu Han <quic_zhonhan@...cinc.com>,
	Blake Jones <blakejones@...gle.com>,
	Anubhav Shelat <ashelat@...hat.com>,
	Chun-Tse Shao <ctshao@...gle.com>,
	Christophe Leroy <christophe.leroy@...roup.eu>,
	Jean-Philippe Romain <jean-philippe.romain@...s.st.com>,
	Gautam Menghani <gautam@...ux.ibm.com>,
	Dmitry Vyukov <dvyukov@...gle.com>,
	Yang Li <yang.lee@...ux.alibaba.com>, linux-kernel@...r.kernel.org,
	linux-perf-users@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
	Weilin Wang <weilin.wang@...el.com>
Subject: Re: [RFC PATCH v1 12/15] perf evlist: Add reference count

On Wed, Oct 29, 2025 at 02:12:11PM -0700, Ian Rogers wrote:
> On Wed, Oct 29, 2025 at 11:33 AM Arnaldo Carvalho de Melo <acme@...nel.org> wrote:

> > On Wed, Oct 29, 2025 at 09:56:50AM -0700, Ian Rogers wrote:
> > > On Wed, Oct 29, 2025 at 9:22 AM Arnaldo Carvalho de Melo <acme@...nel.org> wrote:

> > > > On Tue, Oct 28, 2025 at 10:34:10PM -0700, Ian Rogers wrote:
> > > > > This a no-op for most of the perf tool. The reference count is set to
> > > > > 1 at allocation, the put will see the 1, decrement it and perform the
> > > > > delete. The purpose for adding the reference count is for the python
> > > > > code. Prior to this change the python code would clone evlists, but
> > > > > this has issues if events are opened, etc. This change adds a
> > > > > reference count for the evlists and a later change will add it to
> > > > > evsels. The combination is needed for the python code to operate
> > > > > correctly (not hit asserts in the evsel clone), but the changes are
> > > > > broken apart for the sake of smaller patches.

> > > > Looks ok, noisy for all the s/delete/put/ but that is ok, but then you
> > > > are not using the RC_CHK_ACCESS stuff from the get go, why not?

> > > So if I did RC_CHK_ACCESS then every evsel access would need updating,

> > Fair enough, I think it would be informative to have a comment
> > mentioning this near the refcount_t to avoid this question popping up
> > again.
 
> Sgtm. I think we can also add the RC_CHK_ACCESS to evlist as that is a
> boring blob of a thing to pass around.
 
> How are things outside of this? The python changes, how to do the
> process_events callbacks, etc. Any thoughts on the tool API vs the
> script API (stat vs stat_round) ?

I'll try and resume reviewing at that point, but I don't antecipate
problems and like the direction of this work.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ