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:	Thu, 12 Dec 2013 14:05:06 +0200
From:	Adrian Hunter <adrian.hunter@...el.com>
To:	David Ahern <dsahern@...il.com>
CC:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>,
	Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH v0 07/71] perf tools: Record whether a dso is 64-bit

On 11/12/13 21:26, David Ahern wrote:
> On 12/11/13, 5:36 AM, Alexander Shishkin wrote:
>> diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
>> index a0c7c59..80817ec 100644
>> --- a/tools/perf/util/dso.c
>> +++ b/tools/perf/util/dso.c
>> @@ -446,6 +446,7 @@ struct dso *dso__new(const char *name)
>>           dso->cache = RB_ROOT;
>>           dso->symtab_type = DSO_BINARY_TYPE__NOT_FOUND;
>>           dso->data_type   = DSO_BINARY_TYPE__NOT_FOUND;
>> +        dso->is_64_bit = (sizeof(void *) == 8);
> 
> Isnt' that going to record the bitness of perf when it is compiled?
> 
>>           dso->loaded = 0;
>>           dso->rel = 0;
>>           dso->sorted_by_name = 0;
>> diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
>> index 384f2d9..62680e1 100644
>> --- a/tools/perf/util/dso.h
>> +++ b/tools/perf/util/dso.h
>> @@ -91,6 +91,7 @@ struct dso {
>>       u8         annotate_warned:1;
>>       u8         sname_alloc:1;
>>       u8         lname_alloc:1;
>> +    u8         is_64_bit:1;
> 
> The is_64_bit name seems a bit hardcoded. We need something similar for
> perf-trace to set the audit machine type for resolving syscalls. How about
> having this field set a machine type rather than a "64-bit" flag?

I am not sure what you mean by "machine type".  For itrace the
implementation only deals with its own architecture (e.g. the intel_pt
pmu is only on Intel architecture) so it is not necessary to record
the architecture.

is_64_bit corresponds to ELFCLASS64 (vs ELFCLASS32) which is needed
to determine whether the instruction set is 64-bit.  That should
work for other architectures too.

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