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:	Wed, 1 Jun 2016 17:53:22 +0800
From:	Hekuang <hekuang@...wei.com>
To:	Jiri Olsa <jolsa@...hat.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 v7 13/14] perf callchain: Support x86 target platform



在 2016/6/1 16:40, Jiri Olsa 写道:
> On Tue, May 31, 2016 at 11:19:11AM +0000, He Kuang wrote:
>
> SNIP
>
>> diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
>> index e183390..5774317 100644
>> --- a/tools/perf/util/unwind-libunwind.c
>> +++ b/tools/perf/util/unwind-libunwind.c
>> @@ -5,6 +5,7 @@
>>   #include "arch/common.h"
>>   
>>   struct unwind_libunwind_ops __weak *local_unwind_libunwind_ops;
>> +struct unwind_libunwind_ops __weak *x86_32_unwind_libunwind_ops;
>>   
>>   void unwind__register_ops(struct thread *thread,
>>   			  struct unwind_libunwind_ops *ops)
>> @@ -30,7 +31,13 @@ int unwind__prepare_access(struct thread *thread, struct map *map)
>>   			 dso_type == DSO__TYPE_64BIT, map->dso->name);
>>   
>>   	arch = normalize_arch(thread->mg->machine->env->arch);
>> -	pr_debug("unwind: target platform=%s\n", arch);
>> +
>> +	if (!strcmp(arch, "x86"))
>> +		if (dso_type != DSO__TYPE_64BIT)
>> +			ops = x86_32_unwind_libunwind_ops;
>> +
>> +	if (!ops)
>> +		pr_err("unwind: target platform=%s is not supported\n", arch);
> how could ops become NULL in here? it starts with local_unwind_libunwind_ops
> I dont think this check is needed in here

x86_32_unwind_libunwind_ops is a null pointer when x86_32
libunwind is not supported.

There's a weak defination if CONFIG_LIBUNWIND_X86 is not set.

    struct unwind_libunwind_ops __weak *x86_32_unwind_libunwind_ops;

In this case, ops is null and "x86_32 is not supported" error
message is showed up.

> jirka
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ