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: <20171009093838.GB12516@krava>
Date:   Mon, 9 Oct 2017 11:38:38 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Mark Rutland <mark.rutland@....com>
Cc:     linux-kernel@...r.kernel.org, jolsa@...nel.org, acme@...hat.com,
        stable@...r.kernel.org, Adrian Hunter <adrian.hunter@...el.com>,
        Borislav Petkov <bp@...en8.de>,
        David Ahern <dsahern@...il.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Will Deacon <will.deacon@....com>
Subject: Re: [PATCH] perf tools: unbreak perf record for arm/arm64

On Fri, Oct 06, 2017 at 07:38:22PM +0100, Mark Rutland wrote:
> Currently, perf record is broken on arm/arm64 systems when the PMU is
> specified explicitly as part of the event, e.g.
> 
> $ ./perf record -e armv8_cortex_a53/cpu_cycles/u true
> 
> In such cases, perf record fails to open events unless
> perf_event_paranoid is set to -1, even if the PMU in question supports
> mode exclusion. Further, even when perf_event_paranoid is toggled, no
> samples are recorded.
> 
> This is an unintended side effect of commit:
> 
>   e3ba76deef23064f ("perf tools: Force uncore events to system wide monitoring)
> 
> ... which assumes that if a PMU has an associated cpu_map, it is an
> uncore PMU, and forces events for such PMUs to be system-wide.
> 
> This is not true for arm/arm64 systems, which can have heterogeneous
> CPUs. To account for this, multiple CPU PMUs are exposed, each with a
> "cpus" field under sysfs, which the perf tool parses into a cpu_map. ARM
> PMUs do not have a "cpumask" file, and only have a "cpus" file. For the
> gory details as to why, see commit:
> 
>  7e3fcffe95544010 ("perf pmu: Support alternative sysfs cpumask")
> 
> Given all of this, we can instead identify uncore PMUs by explicitly
> checking for a "cpumask" file, and restore arm/arm64 PMU support back to
> a working state. This patch does so, adding a new perf_pmu::is_uncore
> field, and splitting the existing cpumask parsing so that it can be
> reused.
> 
> Signed-off-by: Mark Rutland <mark.rutland@....com>
> Fixes: e3ba76deef23064f ("perf tools: Force uncore events to system wide monitoring)

Acked-by: Jiri Olsa <jolsa@...nel.org>

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ