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:	Sun, 26 Jun 2016 03:56:35 -0700
From:	tip-bot for He Kuang <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	tglx@...utronix.de, hekuang@...wei.com, ak@...ux.intel.com,
	jolsa@...nel.org, hpa@...or.com, adrian.hunter@...el.com,
	namhyung@...nel.org, linux-kernel@...r.kernel.org,
	mhiramat@...nel.org, sukadev@...ux.vnet.ibm.com,
	tumanova@...ux.vnet.ibm.com, dsahern@...il.com, mingo@...nel.org,
	alexander.shishkin@...ux.intel.com, eranian@...gle.com,
	acme@...hat.com, kan.liang@...el.com, penberg@...nel.org,
	peterz@...radead.org, jpoimboe@...hat.com, wangnan0@...wei.com
Subject: [tip:perf/core] perf unwind: Fix wrongly used regs for x86_32
 unwind

Commit-ID:  5dafea097ac65bd01cc86801c399ae41dce79756
Gitweb:     http://git.kernel.org/tip/5dafea097ac65bd01cc86801c399ae41dce79756
Author:     He Kuang <hekuang@...wei.com>
AuthorDate: Wed, 22 Jun 2016 06:57:03 +0000
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 23 Jun 2016 10:30:21 -0300

perf unwind: Fix wrongly used regs for x86_32 unwind

By default, "unwind-libunwind-local.c" gets SP/IP register number
according to the host platform, for remote unwind, we should use
register number for target platform. Fix this by define
LIBUNWIND_ARCH_REG_SP/IP in the wrapper file of x86_32 platform.

Signed-off-by: He Kuang <hekuang@...wei.com>
Acked-by: Jiri Olsa <jolsa@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Ekaterina Tumanova <tumanova@...ux.vnet.ibm.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Kan Liang <kan.liang@...el.com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Pekka Enberg <penberg@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/r/1466578626-92406-3-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/libunwind/x86_32.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/util/libunwind/x86_32.c b/tools/perf/util/libunwind/x86_32.c
index d98c17e..957ffff 100644
--- a/tools/perf/util/libunwind/x86_32.c
+++ b/tools/perf/util/libunwind/x86_32.c
@@ -12,7 +12,13 @@
  */
 
 #define REMOTE_UNWIND_LIBUNWIND
+
+/* Define arch specific functions & regs for libunwind, should be
+ * defined before including "unwind.h"
+ */
 #define LIBUNWIND__ARCH_REG_ID(regnum) libunwind__x86_reg_id(regnum)
+#define LIBUNWIND__ARCH_REG_IP PERF_REG_X86_IP
+#define LIBUNWIND__ARCH_REG_SP PERF_REG_X86_SP
 
 #include "unwind.h"
 #include "debug.h"

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ