Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754081AbcKCHDk (ORCPT ); Thu, 3 Nov 2016 03:03:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42989 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753082AbcKCHDi (ORCPT ); Thu, 3 Nov 2016 03:03:38 -0400 Date: Thu, 3 Nov 2016 12:33:18 +0530 From: "Naveen N. Rao" To: Ravi Bangoria Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, lsorense@csclub.uwaterloo.ca, oohall@gmail.com, ast@kernel.org, chris@distroguy.com, aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com, anton@samba.org, paul.gortmaker@windriver.com, bauerman@linux.vnet.ibm.com, viro@zeniv.linux.org.uk, christophe.leroy@c-s.fr, duwe@lst.de, oss@buserror.net Subject: Re: [PATCH 0/3] powerpc: Emulation support for load/store instructions on LE References: <1478076783-2872-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478076783-2872-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com> User-Agent: Mutt/1.6.2 (2016-07-01) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16110307-0032-0000-0000-00000174367C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16110307-0033-0000-0000-0000108E2ED3 Message-Id: <20161103070318.GI6949@naverao1-tp.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-03_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-1609300000 definitions=main-1611030131 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2010 Lines: 43 On 2016/11/02 02:23PM, Ravi Bangoria wrote: > emulate_step is the basic infrastructure which is used by number of other > kernel infrastructures like kprobe, hw-breakpoint(data breakpoint) etc. > In case of kprobe, enabling emulation of load/store instructions will > speedup the execution of probed instruction. In case of kernel-space > breakpoint, causative instruction is first get emulated before executing > user registered handler. If emulation fails, hw-breakpoint is disabled > with error. As emulate_step does not support load/store instructions on > LE, kernel-space hw-breakpoint infrastructure is broken on LE. > > emulate_step() uses a number of underlying kernel functions that were > initially not enabled for LE. This has been rectified since. So, fix > emulate_step() for LE for the corresponding instructions. > > Also add selftest which will run at boot if CONFIG_KPROBES_SANITY_TEST > and CONFIG_PPC64 is set. > > Changes w.r.t. RFC: > - Enable emulation support for all types of (Normal, Floating Point, > Vector and Vector Scalar) load/store instructions. > - Introduce selftest to test emulate_step for load/store instructions. > > Ravi Bangoria (3): > powerpc: Emulation support for load/store instructions on LE > powerpc: Add encoding for couple of load/store instructions > powerpc: emulate_step test for load/store instructions > > arch/powerpc/include/asm/ppc-opcode.h | 7 + > arch/powerpc/include/asm/sstep.h | 8 + > arch/powerpc/kernel/kprobes.c | 2 + > arch/powerpc/lib/Makefile | 4 + > arch/powerpc/lib/sstep.c | 20 -- > arch/powerpc/lib/test_emulate_step.c | 439 ++++++++++++++++++++++++++++++++++ > 6 files changed, 460 insertions(+), 20 deletions(-) > create mode 100644 arch/powerpc/lib/test_emulate_step.c Patch 2 can be folded into the third patch. Apart from that, and the minor nit with patch 3, for this series: Reviewed-by: Naveen N. Rao Thanks, Naveen