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] [day] [month] [year] [list]
Date:	Tue, 14 Jun 2016 09:46:39 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Michael Ellerman <mpe@...erman.id.au>
Cc:	"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	Anton Blanchard <anton@...abs.org>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	He Kuang <hekuang@...wei.com>
Subject: Re: [PATCH 2/2] perf annotate: add powerpc support

Em Tue, Jun 14, 2016 at 01:40:47PM +1000, Michael Ellerman escreveu:
> On Fri, 2016-06-10 at 20:08 +0530, Naveen N. Rao wrote:
> > On 2016/06/10 10:36AM, Arnaldo Carvalho de Melo wrote:
> > > Em Fri, Jun 10, 2016 at 06:32:51PM +0530, Naveen N. Rao escreveu:
> > > > Convert ins__find() to a __weak function for generic functionality,
> > > > while adding a powerpc-specific variant. We look at the function name
> > > > for branch instructions and classify the instructions to one among a
> > > > branch, a function call (branch with LR update) or a function return
> > > > (branch to LR).

> > > How would this allow one to get a perf.data collected on a powerpc
> > > system, transfer it to a x86-64 (or aarch64, to mention another
> > > workstation wannabe chip) system and then try annotating it?

> > > There was a previous discussion about this, and it involved having all
> > > yout ppc tables available as well as other arches tables, and then
> > > choosing which one to use based on:

> > > 	normalize_arch(thread->mg->machine->env->arch)

> > > just like was done for support cross unwinding, see recent patch kit by
> > > He Kuang, CCed.

> > Nice. This would be good to have. I will look at adding powerpc support 
> > for cross-architecture unwind.

> > However, for cross-architecture annotation, I think there will be a lot 
> > more dependencies since perf currently uses objdump to obtain the 
> > disassembly. In addition, the actual binaries will also be needed.
 
> It's possible to build a multi-arch objdump, I don't know if it's packaged on
> all distros, or if perf wants to depend on it.

Somebody noticed that we can specify a different objdump binary, from a
cross toolchain package.

We need to at least check if the objdump being used supports the
architecture where the perf.data file was generated, refusing to process
the file for which there is no support, providing a clear message to
users trying to process such files.

I.e. checking if normalize_arch(thread->mg->machine->env->arch) is one of:

[acme@...et linux]$ objdump -m 2>&1|grep 'objdump: supported' 
objdump: supported targets: elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
objdump: supported architectures: i386 i386:x86-64 i386:x64-32 i8086 i386:intel i386:x86-64:intel i386:x64-32:intel i386:nacl i386:x86-64:nacl i386:x64-32:nacl l1om l1om:intel k1om k1om:intel plugin
[acme@...et linux]$

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ