Subject: Re: [PATCH 3/4] powerpc/kprobes: Blacklist emulate_update_regs() from kprobes

From: Masami Hiramatsu <[email-masked]>
Date: Thu, 26 Oct 2017 01:36:31 +0900

On Mon, 23 Oct 2017 22:07:40 +0530
"Naveen N. Rao" <[email-masked]> wrote:

> Commit 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't
> modify *regs") introduced emulate_update_regs() to perform part of what
> emulate_step() was doing earlier. However, this function was not added
> to the kprobes blacklist. Add it so as to prevent it from being probed.
> 

Looks good to me.

Acked-by: Masami Hiramatsu <[email-masked]>

Thank you!

> Signed-off-by: Naveen N. Rao <[email-masked]>
> ---
>  arch/powerpc/lib/sstep.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
> index 8c3955e183d4..70274b7b4773 100644
> --- a/arch/powerpc/lib/sstep.c
> +++ b/arch/powerpc/lib/sstep.c
> @@ -2717,6 +2717,7 @@ void emulate_update_regs(struct pt_regs *regs, struct instruction_op *op)
>  	}
>  	regs->nip = next_pc;
>  }
> +NOKPROBE_SYMBOL(emulate_update_regs);
>  
>  /*
>   * Emulate a previously-analysed load or store instruction.
> -- 
> 2.14.2
> 

-- 
Masami Hiramatsu <[email-masked]>