From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341AbdBXT5d (ORCPT ); Fri, 24 Feb 2017 14:57:33 -0500 Received: from mail.kernel.org ([198.145.29.136]:49522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751219AbdBXT52 (ORCPT ); Fri, 24 Feb 2017 14:57:28 -0500 Date: Fri, 24 Feb 2017 16:57:22 -0300 From: Arnaldo Carvalho de Melo To: Michael Ellerman Cc: "Naveen N. Rao" , Masami Hiramatsu , Ananth N Mavinakayanahalli , Ingo Molnar , Steven Rostedt , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v2 2/5] powerpc: kretprobes: override default function entry offset Message-ID: <20170224195722.GM3595@kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Feb 22, 2017 at 07:23:38PM +0530, Naveen N. Rao escreveu: > With ABIv2, we offset 8 bytes into a function to get at the local entry > point. So, I think I can carry the first one via Ingo, etc, what about this one? Is it ok for me to process it? Seems simple enough, has been thru a lot of discussion, but would be better if it was Reviewed-by the PPC maintainers or else just processed by them. Please advise, - Arnaldo > Signed-off-by: Naveen N. Rao > --- > arch/powerpc/kernel/kprobes.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c > index 735ff3d3f77d..e37b76b8b6b2 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.0