Re: [RFT PATCH -next ] [BUGFIX] kprobes: Fix "Failed to find blacklist" error on ia64 and ppc64
From: Masami Hiramatsu <hidden>
Date: 2014-05-09 08:06:56
Also in:
lkml
(2014/05/08 15:16), Ananth N Mavinakayanahalli wrote:
On Thu, May 08, 2014 at 02:40:00PM +0900, Masami Hiramatsu wrote:quoted
(2014/05/08 13:47), Ananth N Mavinakayanahalli wrote:quoted
On Wed, May 07, 2014 at 08:55:51PM +0900, Masami Hiramatsu wrote: ...quoted
+#if defined(CONFIG_PPC64) && (!defined(_CALL_ELF) || _CALL_ELF == 1) +/* + * On PPC64 ABIv1 the function pointer actually points to the + * function's descriptor. The first entry in the descriptor is the + * address of the function text. + */ +#define constant_function_entry(fn) (((func_descr_t *)(fn))->entry) +#else +#define constant_function_entry(fn) ((unsigned long)(fn)) +#endif + #endif /* __ASSEMBLY__ */Hi Masami, You could just use ppc_function_entry() instead.No, I think ppc_function_entry() has two problems (on the latest -next kernel) At first, that is an inlined functions which is not applied in build time. Since the NOKPROBE_SYMBOL() is used outside of any functions as like as EXPORT_SYMBOL(), we can only use preprocessed macros. Next, on PPC64 ABI*v2*, ppc_function_entry() returns local function entry, which seems global function entry + 2 insns. I'm not sure about implementation of the kallsyms on PPC64 ABIv2, but I guess we need global function entry for kallsyms.ABIv2 does away with function descriptors and Anton fixed up that routine to handle the change (the +2 is an artefact of that).
Hmm, do you mean that the address +2 is the actual entry point? I'd like to know which address is same as the address shown in /proc/kallsyms.
quoted
BTW, could you test this patch on the latest -next tree on PPC64 if possible?I'll test it, but it may take a bit.
Thanks for your help!
Ananth
-- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Research Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com