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]
Message-Id: <1446669978-6366-1-git-send-email-maddy@linux.vnet.ibm.com>
Date:	Thu,  5 Nov 2015 02:16:15 +0530
From:	Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>
To:	linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, x86@...nel.org
Cc:	Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Jiri Olsa <jolsa@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Stephane Eranian <eranian@...il.com>,
	Russell King <linux@....linux.org.uk>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Michael Ellerman <mpe@...erman.id.au>,
	Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Subject: [RFC PATCH  0/3]perf/core: extend perf_reg and perf_sample_regs_intr

This patchset extend the perf sample regs infrastructure
to include architecture specific regs. Current perf_sample_regs_intr
exports only registers in the pt_regs to perf.data using
PERF_SAMPLE_REGS_INTR sample type. But sometimes we end up looking
for or prefer raw register values at the interrupt during debug.

This patchset extends the perf_regs to include arch specific struct,
and makes perf_sample_regs_intr in kernel/event/core.c as __weak__
function. This way, an arch specific implementation of
perf_sample_regs_intr() can update the arch specific data to
the perf_regs.

First patch defines a new structure arch_misc_reg and updates the same
in the struct perf_regs. Patch also modifies the perf_reg_value()
and perf_output_sample_regs() to take perf_regs parameter instead of pt_regs.

Second patch updates struct arch_misc_reg for arch/powerpc with pmu registers
and adds offsetof macro for the same. It extends perf_reg_value()
to use reg idx to decide on struct to return value from.

Third patch adds arch specific perf_sample_regs_intr() in arch/powerpc
to hook up the arch_misc_regs to perf_regs.

This patchset depends on the recent posting by Anju T in
linuxppc-dev@...ts.ozlabs.org to enable PERF_SAMPLE_REGS_INTR
support in arch/powerpc.

https://patchwork.ozlabs.org/patch/539242/
https://patchwork.ozlabs.org/patch/539243/
https://patchwork.ozlabs.org/patch/539244/

Would appreciate comments and feedback.

Signed-off-by: Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Stephane Eranian <eranian@...il.com>
Cc: Russell King <linux@....linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Will Deacon <will.deacon@....com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>

Madhavan Srinivasan (3):
  perf/core: extend perf_regs to include arch specific regs
  perf/powerpc: update macros and add regs to arch_misc_reg struct
  perf/powerpc: Functions to update arch_misc_regs

 arch/arm/include/asm/ptrace.h               |  2 ++
 arch/arm/kernel/perf_regs.c                 |  4 +++-
 arch/arm64/include/asm/ptrace.h             |  2 ++
 arch/arm64/kernel/perf_regs.c               |  4 +++-
 arch/powerpc/include/uapi/asm/perf_regs.h   | 10 ++++++++++
 arch/powerpc/include/uapi/asm/ptrace.h      | 11 +++++++++++
 arch/powerpc/perf/core-book3s.c             | 29 +++++++++++++++++++++++++++++
 arch/powerpc/perf/perf_regs.c               | 28 ++++++++++++++++++++++++++--
 arch/x86/include/asm/ptrace.h               |  2 ++
 arch/x86/kernel/perf_regs.c                 |  4 +++-
 include/linux/perf_regs.h                   |  5 +++--
 kernel/events/core.c                        |  8 ++++----
 tools/perf/arch/powerpc/include/perf_regs.h | 16 ++++++++++++++++
 13 files changed, 114 insertions(+), 11 deletions(-)

--
1.9.1

--
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