linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
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,
	Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/5] powerpc/kprobes: Do not suppress instruction emulation if a single run failed
Date: Thu, 14 Sep 2017 02:45:27 -0700	[thread overview]
Message-ID: <20170914024527.c5e52b918372e00061371014@kernel.org> (raw)
In-Reply-To: <20170914063807.6cmvisfiwfeluuv3@naverao1-tp.localdomain>

On Thu, 14 Sep 2017 12:08:07 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:

> On 2017/09/13 04:53PM, Masami Hiramatsu wrote:
> > On Thu, 14 Sep 2017 02:50:33 +0530
> > "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:
> > 
> > > Currently, we disable instruction emulation if emulate_step() fails for
> > > any reason. However, such failures could be transient and specific to a
> > > particular run. Instead, only disable instruction emulation if we have
> > > never been able to emulate this. If we had emulated this instruction
> > > successfully at least once, then we single step only this probe hit and
> > > continue to try emulating the instruction in subsequent probe hits.
> > 
> > Hmm, would this mean that the instruction is emulatable or not depends
> > on context? What kind of situation is considerable?
> 
> Yes, as an example, a load/store instruction can cause exceptions 
> depending on the address. In some of those cases, we will have to single 
> step the instruction, but we will be able to emulate in most scenarios.

OK, I got it.
Could you add this example as comment in the code so that readers can
easily understand?

Thank you,

> 
> Thanks for the review!
> - Naveen
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2017-09-14  9:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 21:20 [PATCH 1/5] powerpc/kprobes: Some cosmetic updates to try_to_emulate() Naveen N. Rao
2017-09-13 21:20 ` [PATCH 2/5] powerpc/kprobes: Do not suppress instruction emulation if a single run failed Naveen N. Rao
2017-09-13 23:53   ` Masami Hiramatsu
2017-09-14  6:38     ` Naveen N. Rao
2017-09-14  9:45       ` Masami Hiramatsu [this message]
2017-09-14 10:03         ` Naveen N. Rao
2017-09-13 21:20 ` [PATCH 3/5] powerpc/kprobes: Fix warnings from __this_cpu_read() on preempt kernels Naveen N. Rao
2017-09-14  0:36   ` Masami Hiramatsu
2017-09-14  6:47     ` Naveen N. Rao
2017-09-14 10:10       ` Masami Hiramatsu
2017-09-16 11:25         ` Naveen N. Rao
2017-09-14  9:48   ` Kamalesh Babulal
2017-09-13 21:20 ` [PATCH 4/5] powerpc/jprobes: Disable preemption when triggered through ftrace Naveen N. Rao
2017-09-14  0:05   ` Masami Hiramatsu
2017-09-14 10:25     ` Naveen N. Rao
2017-09-14 10:53       ` Masami Hiramatsu
2017-09-13 21:20 ` [PATCH 5/5] powerpc/jprobes: Validate break handler invocation as being due to a jprobe_return() Naveen N. Rao
2017-09-14  0:38   ` Masami Hiramatsu
2017-09-13 23:18 ` [PATCH 1/5] powerpc/kprobes: Some cosmetic updates to try_to_emulate() Masami Hiramatsu
2017-09-14  6:16 ` Kamalesh Babulal

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=20170914024527.c5e52b918372e00061371014@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=kamalesh@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).