[PATCH v2 2/2] powerpc: kprobes: invoke handlers directly

Michael Ellerman mpe at ellerman.id.au
Tue Nov 22 21:43:28 AEDT 2016


"Naveen N. Rao" <naveen.n.rao at linux.vnet.ibm.com> writes:
> On 2016/11/22 02:25PM, Masami Hiramatsu wrote:
>> On Mon, 21 Nov 2016 22:36:41 +0530
>> "Naveen N. Rao" <naveen.n.rao at linux.vnet.ibm.com> wrote:
>> > diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h
>> > index 2c9759bd..da30dc3 100644
>> > --- a/arch/powerpc/include/asm/kprobes.h
>> > +++ b/arch/powerpc/include/asm/kprobes.h
>> > @@ -32,6 +32,7 @@
>> >  #include <asm/probes.h>
>> >  #include <asm/code-patching.h>
>> >  
>> > +#ifdef CONFIG_KPROBES
>> >  #define  __ARCH_WANT_KPROBES_INSN_SLOT
>> >  
>> >  struct pt_regs;
>> > @@ -127,5 +128,11 @@ struct kprobe_ctlblk {
>> >  extern int kprobe_exceptions_notify(struct notifier_block *self,
>> >  					unsigned long val, void *data);
>> >  extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
>> > +extern int kprobe_handler(struct pt_regs *regs);
>> > +extern int kprobe_post_handler(struct pt_regs *regs);
>> > +#else
>> > +static int kprobe_handler(struct pt_regs *regs) { return 0; }
>> > +static int kprobe_post_handler(struct pt_regs *regs) { return 0; }
>> 
>> These should be "static inline int kprobe_...", you lost 'inline' here.
>> Others are OK for me.
>
> Ah, indeed. Good catch. Thanks.
>  
> Michael,
> Would you be ok to make this change when applying this, if you're ok 
> with the rest of the patch?

Yep done.

Why do we still need kprobe_exceptions_notify() now that it's empty?
Just to keep the generic code happy?

cheers


More information about the Linuxppc-dev mailing list