Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752685AbdCHLKI (ORCPT ); Wed, 8 Mar 2017 06:10:08 -0500 Received: from ozlabs.org ([103.22.144.67]:44023 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751883AbdCHLKC (ORCPT ); Wed, 8 Mar 2017 06:10:02 -0500 From: Michael Ellerman To: "Naveen N. Rao" , Arnaldo Carvalho de Melo Cc: Masami Hiramatsu , Steven Rostedt , Ingo Molnar , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Ananth N Mavinakayanahalli Subject: Re: [PATCH v5 2/5] powerpc: kretprobes: override default function entry offset In-Reply-To: <53bcae5a711eab803c9c3210110e8a464df34202.1488961018.git.naveen.n.rao@linux.vnet.ibm.com> References: <53bcae5a711eab803c9c3210110e8a464df34202.1488961018.git.naveen.n.rao@linux.vnet.ibm.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Wed, 08 Mar 2017 21:43:29 +1100 Message-ID: <87o9xcujzi.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1764 Lines: 56 "Naveen N. Rao" writes: > With ABIv2, we offset 8 bytes into a function to get at the local entry > point. > > Acked-by: Ananth N Mavinakayanahalli > Acked-by: Michael Ellerman > Signed-off-by: Naveen N. Rao > --- > arch/powerpc/kernel/kprobes.c | 9 +++++++++ > 1 file changed, 9 insertions(+) I'm OK with this change, and I'm happy for it to go with the rest of the series via acme's tree: Acked-by: Michael Ellerman But, you've also sent a series to do KPROBES_ON_FTRACE, and that also touches this function, see the 2nd to last hunk at: https://patchwork.ozlabs.org/patch/730675/ If this goes via acme's tree it will be awkward for me to merge the series above via the powerpc tree. So we could do topic branches and so on, or we could just drop this patch from this series, and I'll merge it as part of the other series. It won't do anything useful until it's merged with a tree that also has the rest of this series. Or something else I haven't thought of. cheers > diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c > index fce05a38851c..331751701fed 100644 > --- a/arch/powerpc/kernel/kprobes.c > +++ b/arch/powerpc/kernel/kprobes.c > @@ -131,6 +131,15 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, > kcb->kprobe_saved_msr = regs->msr; > } > > +bool arch_function_offset_within_entry(unsigned long offset) > +{ > +#ifdef PPC64_ELF_ABI_v2 > + return offset <= 8; > +#else > + return !offset; > +#endif > +} > + > void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, > struct pt_regs *regs) > { > -- > 2.11.1