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]
Date:   Thu, 15 Apr 2021 16:11:06 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     "Jin, Yao" <yao.jin@...ux.intel.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v3 12/27] perf parse-events: Support no alias assigned
 event inside hybrid PMU

On Thu, Apr 15, 2021 at 09:36:16PM +0800, Jin, Yao wrote:

SNIP

> > > +	int n = 0;
> > > +
> > > +	list_for_each(pos, list)
> > > +		n++;
> > > +
> > > +	return n;
> > > +}
> > > +
> > > +static int parse_events__with_hybrid_pmu(struct parse_events_state *parse_state,
> > > +					 const char *str, char *pmu_name,
> > > +					 bool *found, struct list_head *list)
> > > +{
> > > +	struct parse_events_state ps = {
> > > +		.list           = LIST_HEAD_INIT(ps.list),
> > > +		.stoken         = PE_START_EVENTS,
> > > +		.pmu_name       = pmu_name,
> > > +		.idx            = parse_state->idx,
> > > +	};
> > 
> > could we add this pmu_name directly to __parse_events?
> > 
> 
> Do you suggest we directly call __parse_events()?
> 
> int __parse_events(struct evlist *evlist, const char *str,
> 		   struct parse_events_error *err, struct perf_pmu *fake_pmu)
> 
> 	struct parse_events_state parse_state = {
> 		.list	  = LIST_HEAD_INIT(parse_state.list),
> 		.idx	  = evlist->core.nr_entries,
> 		.error	  = err,
> 		.evlist	  = evlist,
> 		.stoken	  = PE_START_EVENTS,
> 		.fake_pmu = fake_pmu,
> 	};
> 
> But for parse_events__with_hybrid_pmu, we don't have valid evlist. So if we
> switch to __parse_events, evlist processing may be a problem.

you should use parse_state->evlist no? but we can chec/make this
change in next itaration.. it's already lot of changes

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ