mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anju T Sudhakar <anju@linux.vnet.ibm.com>
To: Michael Ellerman <patch-notifications@ellerman.id.au>,
	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: Wed, 15 Feb 2017 10:44:18 +0530	[thread overview]
Message-ID: <584d290d-e571-5ade-c239-563cb0440704@linux.vnet.ibm.com> (raw)
In-Reply-To: <3vN27w1vFGz9s74@ozlabs.org>

Thank You Michael.  :)


On Tuesday 14 February 2017 06:10 PM, Michael Ellerman wrote:
> 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-15  5:14 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   ` [v4,1/2] " Michael Ellerman
2017-02-15  5:14     ` Anju T Sudhakar [this message]
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=584d290d-e571-5ade-c239-563cb0440704@linux.vnet.ibm.com \
    --to=anju@linux.vnet.ibm.com \
    --cc=ananth@in.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=patch-notifications@ellerman.id.au \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome