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]
Message-ID: <AANLkTin6jSCh7Dqk_uoft7vWwiEoyJPBBAFXpnQiCQjT@mail.gmail.com>
Date:	Fri, 14 May 2010 00:10:10 +0200
From:	Chase Douglas <chase.douglas@...onical.com>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc:	Masami Hiramatsu <mhiramat@...hat.com>,
	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: perf: relative path to source for perf probe?

On Thu, May 13, 2010 at 11:46 PM, Arnaldo Carvalho de Melo
<acme@...stprotocols.net> wrote:
> IOW:
>
> real_path = user_provided_path + (DW_AT_name - DW_AT_comp_dir)
>
> + == concat
>
> - remove initial string
>
> if the project is build in place, i.e. in the kernel case, when one
> doesn't use 'make O='
>
> But then, given user_provided_path what we can do is to find a match
> from the end of DW_AT_name, thus infering the missing (non-existent in
> DWARF) DW_AT_source_dir tag :-)
>
>> In this case (after compiling kernel, user moved its source into another
>> directory), we have to find the top directory of this source code.
>>
>> Imagine that, if user compiled code under /home/user/git-ksrc/, and
>> it was moved under  /usr/src/2.6.x/, perf probe will be given an option
>> '-s /usr/src/2.6.x/'.
>
> So, for the DW_AT_name example above, we would have these files:
>
> At build time (DW_AT_name):
>
> /home/acme_unencrypted/git/linux-2.6-tip/arch/x86/kernel/head_64.S
>
> And at analysis time (using the path where the user moved all the source
> tree):
>
> /usr/src/2.6.x/arch/x86/kernel/head_64.S
>
> Putting then side by side:
>
> /home/acme_unencrypted/git/linux-2.6-tip/arch/x86/kernel/head_64.S
>                          /usr/src/2.6.x/arch/x86/kernel/head_64.S
>
> So know we know what DW_AT_source_dir is.
>
> Implementation is left to the reader 8-)

Thank you both for this discussion! I think I have enough information
to try to create an implementation. Now I just need to find the time
to do it :).

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