All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Anju T <anju@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: ananth@in.ibm.com, mahesh@linux.vnet.ibm.com, paulus@samba.org,
	mhiramat@kernel.org, naveen.n.rao@linux.vnet.ibm.com,
	hemant@linux.vnet.ibm.com, srikar@linux.vnet.ibm.com
Subject: Re: [v4,1/2] arch/powerpc: Implement Optprobes
Date: Tue, 14 Feb 2017 23:40:28 +1100 (AEDT)	[thread overview]
Message-ID: <3vN27w1vFGz9s74@ozlabs.org> (raw)
In-Reply-To: <1486547452-13510-2-git-send-email-anju@linux.vnet.ibm.com>

On Wed, 2017-02-08 at 09:50:51 UTC, Anju T wrote:
> Current infrastructure of kprobe uses the unconditional trap instruction
> to probe a running kernel. Optprobe allows kprobe to replace the trap with
> a branch instruction to a detour buffer. Detour buffer contains instructions
> to create an in memory pt_regs. Detour buffer also has a call to
> optimized_callback() which in turn call the pre_handler().
> After the execution of the pre-handler, a call is made for instruction
> emulation. The NIP is determined in advanced through dummy instruction
> emulation and a branch instruction is created to the NIP at the end of
> the trampoline.
> 
> To address the limitation of branch instruction in POWER architecture,
> detour buffer slot is allocated from a reserved area. For the time being,
> 64KB is reserved in memory for this purpose.
> 
> Instructions which can be emulated using analyse_instr() are the candidates
> for optimization. Before optimization ensure that the address range
> between the detour buffer allocated and the instruction being probed
> is within +/- 32MB.
> 
> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/51c9c0843993528bffc920c54c2121

cheers

  reply	other threads:[~2017-02-14 12:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08  9:50 [PATCH v4 0/2] OPTPROBES for powerpc Anju T Sudhakar
2017-02-08  9:50 ` [PATCH v4 1/2] arch/powerpc: Implement Optprobes Anju T Sudhakar
2017-02-14 12:40   ` Michael Ellerman [this message]
2017-02-15  5:14     ` [v4,1/2] " Anju T Sudhakar
2017-02-08  9:50 ` [PATCH v4 2/2] arch/powerpc: Optimize kprobe in kretprobe_trampoline Anju T Sudhakar

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=3vN27w1vFGz9s74@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=ananth@in.ibm.com \
    --cc=anju@linux.vnet.ibm.com \
    --cc=hemant@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=mhiramat@kernel.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=srikar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.