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:   Mon, 28 Aug 2017 21:24:32 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        David Ahern <dsahern@...il.com>,
        Andi Kleen <andi@...stfloor.org>,
        Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH 01/10] perf/x86: Add warning on proper cpu during event's
 update

On Thu, Aug 24, 2017 at 06:27:28PM +0200, Jiri Olsa wrote:
> Mark reported that we could actually call pmu->read on
> unscheduled event. I think it's good idea to keep a
> warning here to see if we've get it wrong again in
> future.
> 
> Reported-by: Mark Rutland <mark.rutland@....com>
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>

Yeah, no objection to this one.

Ack

> ---
>  arch/x86/events/core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
> index af12e294caed..b8e394d9f7f2 100644
> --- a/arch/x86/events/core.c
> +++ b/arch/x86/events/core.c
> @@ -72,6 +72,8 @@ u64 x86_perf_event_update(struct perf_event *event)
>  	int idx = hwc->idx;
>  	u64 delta;
>  
> +	WARN_ON_ONCE(event->oncpu != smp_processor_id());
> +
>  	if (idx == INTEL_PMC_IDX_FIXED_BTS)
>  		return 0;
>  
> -- 
> 2.9.5
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ