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: <87ionpxmyi.fsf@ashishki-desk.ger.corp.intel.com>
Date:	Wed, 25 Jun 2014 14:12:05 +0300
From:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Robert Richter <rric@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>,
	Andi Kleen <ak@...ux.intel.com>
Subject: Re: [RFC v2 5/7] perf: add a pmu capability for "exclusive" events

Peter Zijlstra <peterz@...radead.org> writes:

> On Wed, Jun 11, 2014 at 06:41:48PM +0300, Alexander Shishkin wrote:
>> +static bool exclusive_event_ok(struct perf_event *event,
>> +			      struct perf_event_context *ctx)
>> +{
>> +	struct perf_event *iter_event;
>> +
>> +	if (!(event->pmu->capabilities & PERF_PMU_CAP_EXCLUSIVE))
>> +		return true;
>> +
>> +	list_for_each_entry(iter_event, &ctx->event_list, event_entry) {
>> +		if (exclusive_event_match(iter_event, event))
>> +			return false;
>> +	}
>
> This list iteration needs either rcu or ctx->lock or ctx->mutex, and the
> two callsites below don't have either afaict.

True, this needs to be done before perf_install_in_context() under the
same ctx->mutex. Thanks!

Regards,
--
Alex
--
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