From: Masami Hiramatsu <mhiramat@kernel.org>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org,
Masami Hiramatsu <mhiramat@kernel.org>,
Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Subject: Re: [PATCH 3/4] powerpc/kprobes: Blacklist emulate_update_regs() from kprobes
Date: Thu, 26 Oct 2017 01:36:31 +0900 [thread overview]
Message-ID: <20171026013631.aad0fc7b0d77ef02616b806e@kernel.org> (raw)
In-Reply-To: <df974488791e93054bce0bea032ef1b1ec8ad873.1508776485.git.naveen.n.rao@linux.vnet.ibm.com>
On Mon, 23 Oct 2017 22:07:40 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> 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 <mhiramat@kernel.org>
Thank you!
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> ---
> 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 <mhiramat@kernel.org>
next prev parent reply other threads:[~2017-10-25 16:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 16:37 [PATCH 1/4] powerpc/kprobes: Disable preemption before invoking probe handler for optprobes Naveen N. Rao
2017-10-23 16:37 ` [PATCH 2/4] powerpc/kprobes: Do not disable interrupts for optprobes and kprobes_on_ftrace Naveen N. Rao
2017-10-25 2:19 ` Masami Hiramatsu
2017-10-23 16:37 ` [PATCH 3/4] powerpc/kprobes: Blacklist emulate_update_regs() from kprobes Naveen N. Rao
2017-10-25 16:36 ` Masami Hiramatsu [this message]
2017-10-23 16:37 ` [PATCH 4/4] powerpc/kprobes: refactor kprobe_lookup_name for safer string operations Naveen N. Rao
2017-10-25 16:35 ` Masami Hiramatsu
2017-10-27 11:34 ` Naveen N. Rao
2017-10-25 2:18 ` [PATCH 1/4] powerpc/kprobes: Disable preemption before invoking probe handler for optprobes Masami Hiramatsu
2017-10-27 11:27 ` Naveen N. Rao
2017-11-14 11:12 ` [1/4] " Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171026013631.aad0fc7b0d77ef02616b806e@kernel.org \
--to=mhiramat@kernel.org \
--cc=ananth@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).