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:	Wed, 23 Apr 2014 18:31:18 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	David Ahern <dsahern@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Don Zickus <dzickus@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 3/5] perf tools: Reference count map_groups objects

On Tue, Apr 15, 2014 at 12:17:22PM -0600, David Ahern wrote:
> On 4/15/14, 3:56 AM, Jiri Olsa wrote:
> >
> >hum.. I think using atomic type is not enough, we'd need
> >to make map_groups__put/get atomic as well
> >
> >not sure what's the support in user space for that.. will check
> >
> >also not to be negative, but libperf is not thread safe anyway, right? ;-)
> 
> should be. pretty certain there have been bug reports (e.g,
> perf-top) that stumble onto problems and they get fixed.

I checked and there's no problem with this in perf top, because
all thread allocations and frees (included map_groups) are done
within the main (one) thread

You could get in trouble if you'd call map_groups__get and
map_groups__put over same map_groups object from different
threads, but this never happens in perf

Thats the same sort of issue you would get if you called
machine__findnew_thread over same machine from 2 threads

I think that potential libperf users should be aware of the
proper usage or they should ask for change

thoughts? ;-) thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ