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-next>] [day] [month] [year] [list]
Date:   Wed, 15 Jan 2020 10:58:54 +0000
From:   James Clark <james.clark@....com>
To:     linux-arm-kernel@...ts.infradead.org
Cc:     nd@....com, James Clark <james.clark@....com>,
        Will Deacon <will@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Tan Xiaojun <tanxiaojun@...wei.com>,
        Al Grant <al.grant@....com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: [PATCH 0/1] Return EINVAL when precise_ip perf events are requested on Arm

Hi,

Since we're adding support for SPE in user space Perf, we've encountered an issue
where we would like some more feedback if SPE isn't available for an event.

At the moment there is a patch for perf where you can enable SPE by doing this:

    perf record -r branch-misses:p ...

Perf will have a hard coded list of events that can use SPE when ":p" is specified
and open the SPE PMU instead of the specified one. But if the event isn't in that
list, then Perf will attempt to open the normal event with precise_ip = 1.
That will succeed at the moment, but we'd like the kernel to say it's not supported
so there is a chance of showing a warning to the user.

This isn't just relevant to Perf though, there may be other tools that are already
setting this.

Therefore I'm looking for feedback on whether this would break backwards
compatibility with user space tools that are already setting precise_ip and
expecting it to not error out on Arm.

This change would also be beneficial for the case where if in the (distant) future
we do add some kind of precise support, there will be a chance of userspace
determining what is supported and what isn't.

Thanks
James

Cc: Will Deacon <will@...nel.org>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Tan Xiaojun <tanxiaojun@...wei.com>
Cc: Al Grant <al.grant@....com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org

James Clark (1):
  Return EINVAL when precise_ip perf events are requested on Arm

 drivers/perf/arm_pmu.c          | 3 +++
 include/uapi/linux/perf_event.h | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.24.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ