From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4.hitachi.co.jp (mail4.hitachi.co.jp [133.145.228.5]) by lists.ozlabs.org (Postfix) with ESMTP id A108C1A0123 for ; Wed, 18 Jun 2014 18:47:05 +1000 (EST) Message-ID: <53A15201.7060404@hitachi.com> Date: Wed, 18 Jun 2014 17:46:57 +0900 From: Masami Hiramatsu MIME-Version: 1.0 To: Michael Ellerman Subject: Re: Re: [RFT PATCH -next v3] [BUGFIX] kprobes: Fix "Failed to find blacklist" error on ia64 and ppc64 References: <5387F150.5000307@hitachi.com> <20140530031838.17427.75896.stgit@ltc230.yrl.intra.hitachi.co.jp> <539161D6.7020508@hitachi.com> <1403078179.32307.7.camel@concordia> In-Reply-To: <1403078179.32307.7.camel@concordia> Content-Type: text/plain; charset=UTF-8 Cc: Jeremy Fitzhardinge , linux-ia64@vger.kernel.org, sparse@chrisli.org, Linux Kernel Mailing List , Paul Mackerras , "H. Peter Anvin" , Thomas Gleixner , linux-tip-commits@vger.kernel.org, anil.s.keshavamurthy@intel.com, Ingo Molnar , "Suzuki K. Poulose" , Fenghua Yu , Arnd Bergmann , Rusty Russell , Chris Wright , yrl.pp-manager.tt@hitachi.com, akataria@vmware.com, Tony Luck , Kevin Hao , linuxppc-dev@lists.ozlabs.org, rdunlap@infradead.org, Tony Luck , dl9pf@gmx.de, Andrew Morton , Linus Torvalds , "David S. Miller" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , (2014/06/18 16:56), Michael Ellerman wrote: > On Fri, 2014-06-06 at 15:38 +0900, Masami Hiramatsu wrote: >> Ping? >> >> I guess this should go to 3.16 branch, shouldn't it? > >>> diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h >>> index bfb6ded..8b89d65 100644 >>> --- a/arch/powerpc/include/asm/types.h >>> +++ b/arch/powerpc/include/asm/types.h >>> @@ -25,6 +25,17 @@ typedef struct { >>> unsigned long env; >>> } func_descr_t; >>> >>> +#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 function_entry(fn) (((func_descr_t *)(fn))->entry) >>> +#else >>> +#define function_entry(fn) ((unsigned long)(fn)) >>> +#endif > > We already have ppc_function_entry(), can't you use that? I'd like to ask you whether the address which ppc_function_entry() returns on PPC ABIv2 is really same address in kallsyms or not. As you can see, kprobes uses function_entry() to get the actual entry address where kallsyms knows. I have not much information about that, but it seems that the "global entry point" is the address which kallsyms knows, isn't it? Thank you, -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Research Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com