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: <20160428035130.cbbd7e28701c401057963d5b@kernel.org>
Date:	Thu, 28 Apr 2016 03:51:30 +0900
From:	Masami Hiramatsu <mhiramat@...nel.org>
To:	Hemant Kumar <hemant@...ux.vnet.ibm.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	linux-kernel@...r.kernel.org, Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>
Subject: Re: [PATCH perf/core v4 18/19] perf probe: Allow wildcard for
 cached events

On Wed, 27 Apr 2016 21:04:53 +0530
Hemant Kumar <hemant@...ux.vnet.ibm.com> wrote:

> 
> 
> On 04/26/2016 02:34 PM, Masami Hiramatsu wrote:
> > Allo glob wildcard for reusing cached/SDT events. This also
> > automatically find the target binaries, e.g.
> >
> >    # perf probe -a %sdt_libc:\*
> >
> > This example adds probes for all SDT in libc.
> > Note that the SDTs must have been scanned by perf buildid-cache.
> 
> There is a segfault after applying this patch :
> 
> # perf probe -x /home/hemant/test %marker1
> Segmentation fault (core dumped)
> 
> The problem is there is no group name with this marker and
> strglobmatch tries to match entry->pev.group with pev->group (which is 
> NULL).

Thank you for testing!

[...]
> > +/* Try to find probe_trace_event from given probe caches */
> > +static int find_cached_events(struct perf_probe_event *pev,
> > +			      struct probe_trace_event **tevs,
> > +			      const char *target)
> > +{
> > +	struct probe_cache *cache;
> > +	struct probe_cache_entry *entry;
> > +	struct probe_trace_event *tmp_tevs = NULL;
> > +	int ntevs = 0;
> > +	int ret = 0;
> > +
> > +	cache = probe_cache__new(target);
> > +	if (!cache)
> > +		return -ENOENT;
> > +
> > +	for_each_probe_cache_entry(entry, cache) {
> > +		/* Skip the cache entry which has no name */
> > +		if (!entry->pev.event || !entry->pev.group)
> > +			continue;
> > +		if (strglobmatch(entry->pev.group, pev->group) &&
> > +		    strglobmatch(entry->pev.event, pev->event)) {
> 
> Due to the above issue, we can change the above condition to :
> if (strglobmatch(entry->pev.event, pev->event) {
>      if (!pev->group || (pev->group && strglobmatch(entry->pev.group, 
> pev->group)))
>          // Do stuff
> }

OK, I'll fix that.

thanks!!

-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ