[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5bbe691087d5d13481228037756da54fa1730a80.1488881988.git.naveen.n.rao@linux.vnet.ibm.com>
Date: Tue, 7 Mar 2017 16:17:37 +0530
From: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org,
Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>,
Michael Ellerman <mpe@...erman.id.au>
Subject: [RESEND PATCH 2/6] powerpc: kretprobes: override default function entry offset
With ABIv2, we offset 8 bytes into a function to get at the local entry
point.
Acked-by: Ananth N Mavinakayanahalli <ananth@...ux.vnet.ibm.com>
Acked-by: Michael Ellerman <mpe@...erman.id.au>
Signed-off-by: Naveen N. Rao <naveen.n.rao@...ux.vnet.ibm.com>
---
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 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
Powered by blists - more mailing lists