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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 30 May 2016 10:53:02 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	He Kuang <hekuang@...wei.com>
Cc:	peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
	alexander.shishkin@...ux.intel.com, wangnan0@...wei.com,
	jpoimboe@...hat.com, ak@...ux.intel.com, eranian@...gle.com,
	namhyung@...nel.org, adrian.hunter@...el.com,
	sukadev@...ux.vnet.ibm.com, masami.hiramatsu.pt@...achi.com,
	tumanova@...ux.vnet.ibm.com, kan.liang@...el.com,
	penberg@...nel.org, dsahern@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 08/11] perf tools: Show warnings for unsupported
 cross-platform unwind

On Sat, May 28, 2016 at 11:59:57AM +0000, He Kuang wrote:
> Currently, perf script uses host unwind methods to parse perf.data
> callchain info regardless of the target architecture. So we get wrong
> result without any warnings when unwinding callchains of x86(32-bit)
> on x86(64-bit) machine.
> 
> This patch shows warning messages when we do remote unwind x86(32-bit)
> on other machines. Same thing for other platforms will be added in
> next patches.
> 
> Signed-off-by: He Kuang <hekuang@...wei.com>
> ---
>  tools/perf/config/Makefile         |  8 ++++++++
>  tools/perf/util/thread.c           |  2 +-
>  tools/perf/util/unwind-libunwind.c | 30 +++++++++++++++++++++++++++++-
>  tools/perf/util/unwind.h           |  5 +++--
>  4 files changed, 41 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
> index 3a304a3..e156f76 100644
> --- a/tools/perf/config/Makefile
> +++ b/tools/perf/config/Makefile
> @@ -355,6 +355,14 @@ endif
>  
>  ifndef NO_LIBUNWIND
>    have_libunwind :=
> +
> +  ifeq ($(feature-libunwind-x86), 1)
> +    $(call detected,CONFIG_LIBUNWIND_X86)
> +    CFLAGS += -DHAVE_LIBUNWIND_X86_SUPPORT
> +    LDFLAGS += -lunwind-x86
> +    have_libunwind = 1
> +  endif

this hunk together with the ifdef in 
unwind__prepare_access should go to patch:

  perf callchain: Support x86 target platform

thanks
jirka

SNIP

> +	arch = normalize_arch(thread->mg->machine->env->arch);
> +
> +	if (!strcmp(arch, "x86")) {
> +		if (dso_type != DSO__TYPE_64BIT)
> +#ifdef HAVE_LIBUNWIND_X86_SUPPORT
> +			pr_err("unwind: target platform=%s is not implemented\n", arch);
> +#else
> +			pr_err("unwind: target platform=%s is not supported\n", arch);
> +#endif

SNIP

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ