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:	Tue, 28 Jun 2016 17:17:32 +0530
From:	Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	linux-kernel@...r.kernel.org, anton@...abs.org, mpe@...erman.id.au,
	ananth@...ibm.com, dja@...ens.net
Subject: Re: [RFC 3/6] perf annotate: Enable cross arch annotate



On Monday 27 June 2016 10:46 PM, Arnaldo Carvalho de Melo wrote:
> Em Fri, Jun 24, 2016 at 05:23:57PM +0530, Ravi Bangoria escreveu:
>> Change current data structures and function to enable cross arch annotate
>> and add support for x86 and arm instructions.
>>
>> Current implementation does not contain logic of recording on one arch
>> and annotating on other. This remote annotate is partially possible with
>> current implementation for x86 (or may be arm as well) only. But, to make
>> remote annotation work properly, all architecture instruction tables need
>> to be included in the perf binary. And while annotating, look for
>> instruction table where perf.data was recorded.

...

>>   
>> +static struct arch_instructions {
>> +	const char *arch;
>> +	int	   nmemb;
>> +	struct ins *instructions;
>> +	struct ins *(*ins__find)(const char *);
> Why do we need arch specific find functions? Why not pass the
> instructions pointer to it, just like you did with ins__sort().
>
> Probably it is not needed to be global, you just pick the right
> instructions table + its ARRAY_SIZE and pass it around, again, like you
> did in ins__sort().
>
> - Arnaldo

Thanks Arnaldo for suggestion.

To determine arch in ins__find, I need to pass 'arch' till ins__find and 
which
requires changes in definition of many functions. So, I thought about global
var.

Anyway, I've prepared a patch as you suggested and sent it as a [PATCH].
Please review it.

-Ravi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ