From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755194AbaFSBaj (ORCPT ); Wed, 18 Jun 2014 21:30:39 -0400 Received: from ozlabs.org ([103.22.144.67]:34293 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752240AbaFSBah (ORCPT ); Wed, 18 Jun 2014 21:30:37 -0400 Message-ID: <1403141433.4768.1.camel@concordia> Subject: Re: Re: [RFT PATCH -next v3] [BUGFIX] kprobes: Fix "Failed to find blacklist" error on ia64 and ppc64 From: Michael Ellerman To: Masami Hiramatsu Cc: Benjamin Herrenschmidt , "Suzuki K. Poulose" , Tony Luck , Paul Mackerras , Jeremy Fitzhardinge , linux-ia64@vger.kernel.org, sparse@chrisli.org, "H. Peter Anvin" , Thomas Gleixner , linux-tip-commits@vger.kernel.org, anil.s.keshavamurthy@intel.com, Ingo Molnar , Fenghua Yu , Arnd Bergmann , Rusty Russell , Chris Wright , yrl.pp-manager.tt@hitachi.com, akataria@vmware.com, Tony Luck , Kevin Hao , Linus Torvalds , rdunlap@infradead.org, Linux Kernel Mailing List , dl9pf@gmx.de, Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Date: Thu, 19 Jun 2014 11:30:33 +1000 In-Reply-To: <53A15201.7060404@hitachi.com> References: <5387F150.5000307@hitachi.com> <20140530031838.17427.75896.stgit@ltc230.yrl.intra.hitachi.co.jp> <539161D6.7020508@hitachi.com> <1403078179.32307.7.camel@concordia> <53A15201.7060404@hitachi.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2014-06-18 at 17:46 +0900, Masami Hiramatsu wrote: > (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? OK. I'm not sure off the top of my head which address kallsyms knows about, but yes it's likely that it is the global entry point. I recently sent a patch to add ppc_global_function_entry(), because we need it in the ftrace code. Once that is merged you could use that. How do you hit the original problem, you don't actually specify in your commit message? Something with kprobes obviously, but what exactly? I'll try and reproduce it here. cheers