[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o9xcujzi.fsf@concordia.ellerman.id.au>
Date: Wed, 08 Mar 2017 21:43:29 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
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>
Subject: Re: [PATCH v5 2/5] powerpc: kretprobes: override default function entry offset
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com> writes:
> 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(+)
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 <mpe@...erman.id.au>
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
Powered by blists - more mailing lists