From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755663AbcETLfa (ORCPT ); Fri, 20 May 2016 07:35:30 -0400 Received: from mail.kernel.org ([198.145.29.136]:59958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbcETLf2 (ORCPT ); Fri, 20 May 2016 07:35:28 -0400 Date: Fri, 20 May 2016 20:35:15 +0900 From: Masami Hiramatsu To: Anju T Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, ananth@in.ibm.com, naveen.n.rao@linux.vnet.ibm.com, paulus@samba.org, masami.hiramatsu.pt@hitachi.com, jkenisto@us.ibm.com, srikar@linux.vnet.ibm.com, benh@kernel.crashing.org, mpe@ellerman.id.au, hemant@linux.vnet.ibm.com, mahesh@linux.vnet.ibm.com Subject: Re: [RFC PATCH 2/3] arch/powerpc : optprobes for powerpc core Message-Id: <20160520203515.d1e2e752f59fcc3d3e72e69c@kernel.org> In-Reply-To: <573D7016.2050900@linux.vnet.ibm.com> References: <1463517578-27760-1-git-send-email-anju@linux.vnet.ibm.com> <1463517578-27760-3-git-send-email-anju@linux.vnet.ibm.com> <20160519001304.c7104e18062b324651c97260@kernel.org> <573D7016.2050900@linux.vnet.ibm.com> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 May 2016 13:19:42 +0530 Anju T wrote: > >> +void arch_unoptimize_kprobes(struct list_head *oplist, > >> + struct list_head *done_list) > >> +{ > >> + struct optimized_kprobe *op; > >> + struct optimized_kprobe *tmp; > >> + > >> + list_for_each_entry_safe(op, tmp, oplist, list) { > >> + arch_unoptimize_kprobe(op); > >> + list_move(&op->list, done_list); > >> + } > >> +} > >> + > >> +int arch_within_optimized_kprobe(struct optimized_kprobe *op, > >> + unsigned long addr) > >> +{ > > Please make sure addr != op->kp.addr and addr is aligned. > > The only case this check will succeed is if kp.addr is not a multiple of 4, which is not a valid address at all on > Power.So should we again check here for that? Ah, right. OK, so we may not need that. Thank you, -- Masami Hiramatsu