From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751267AbdBOFOe (ORCPT ); Wed, 15 Feb 2017 00:14:34 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59676 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750732AbdBOFOc (ORCPT ); Wed, 15 Feb 2017 00:14:32 -0500 Subject: Re: [v4,1/2] arch/powerpc: Implement Optprobes To: Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <3vN27w1vFGz9s74@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 From: Anju T Sudhakar Date: Wed, 15 Feb 2017 10:44:18 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <3vN27w1vFGz9s74@ozlabs.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17021505-0028-0000-0000-0000070CCFE6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006618; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000203; SDB=6.00822133; UDB=6.00402166; IPR=6.00599586; BA=6.00005138; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014285; XFM=3.00000011; UTC=2017-02-15 05:14:30 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17021505-0029-0000-0000-0000339556DB Message-Id: <584d290d-e571-5ade-c239-563cb0440704@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-15_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702150053 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 >> Signed-off-by: Naveen N. Rao >> Acked-by: Masami Hiramatsu > Series applied to powerpc next, thanks. > > https://git.kernel.org/powerpc/c/51c9c0843993528bffc920c54c2121 > > cheers >