[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <52F0BB60.8020402@hitachi.com>
Date: Tue, 04 Feb 2014 19:05:20 +0900
From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
David Ahern <dsahern@...il.com>, linux-kernel@...r.kernel.org,
"Steven Rostedt (Red Hat)" <rostedt@...dmis.org>,
Oleg Nesterov <oleg@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
"David A. Long" <dave.long@...aro.org>,
yrl.pp-manager.tt@...achi.com
Subject: Re: Re: Re: [PATCH -tip v2 4/8] perf-probe: Use _stext based address
instead of the symbol name
(2014/02/04 18:49), Masami Hiramatsu wrote:
>>> Couldn't we just use kmap->ref_reloc_sym instead of the hard-coded
>>> "_stext"? You might want to check the Adrian's recent kaslr fixes (now
>>> in tip/perf/urgent).
>>
>> Yeah, I just found Adrian's work and this series must be updated for that,
>> because symbol's address is now based on the real (relocated) address.
>> OK, I'll try to use a symbol in ref_reloc_sym. ;) Thank you for pointed it out!
>
> Hmm, I've tested using ref_reloc_sym for new version, setting probes was OK,
> but getting the address of "_text" always failed. It seems that the kmaps
> doesn't make a symbol for "_text", on the other hand, "_stext" seems always
> available. So I think there are two ways to fix this, use "_stext" as this
> version, or use "_text" and fix dso__load_sym to load "_text" as a function
> symbol if exist.
> I'm not sure why the "_text" is not loaded, is that a policy?
Ah, I see. "_text" is not a function, just a label. That is why it
is not found in function map. Hmm, in that case, maybe I should use
a special case for checking reference symbol is a ref_reloc_sym and
if so, use ref_reloc_sym->unrelocated_addr.
Thank you,
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com
--
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