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:	Fri, 22 Jan 2016 07:59:53 +0000
From:	平松雅巳 / HIRAMATU,MASAMI 
	<masami.hiramatsu.pt@...achi.com>
To:	"'Wangnan (F)'" <wangnan0@...wei.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ben Hutchings <ben@...adent.org.uk>,
	He Kuang <hekuang@...wei.com>
CC:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Jiri Olsa <jolsa@...nel.org>, Kaixu Xia <xiakaixu@...wei.com>,
	Zefan Li <lizefan@...wei.com>
Subject: RE: [PATCH perf 3/4] perf tools: Fix unused variables:
 x86_{32,64}_regoffset_table

>From: Wangnan (F) [mailto:wangnan0@...wei.com]
>On 2016/1/22 13:56, 平松雅巳 / HIRAMATU,MASAMI wrote:
>>> From: Wangnan (F) [mailto:wangnan0@...wei.com]
>>> I think this problem is not introduced by my patch. In fact
>>> there's a fundamental problem in get_arch_regstr() that it is
>>> impossible to switch sub ISA.
>> Right, but I guess this can fixed by switching %sp (for x86-64)
>> and +0(%sp) (for x86-32) instead of $stack.
>>
>
>It may not work.
>
>No matter how we change regoffset_table, when get_arch_regstr()
>get a register number 4, how can it know whether we are looking
>for x86_32 register and return $stack or return %si for x86_64?

I think we can also use elf header to get the ISA of the
target binary.

>The fundamental problem is: we need a way to map dwarf's register
>number to register names so uprobe know which register we are
>looking for, but the API we designed for this can't distinguish
>the sub ISAs dwarf are using.

As I said, we can read the elf header and get the Class or Machine
and switch the table according to it. Can't it?

Thanks,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ