Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756575Ab2FFPLT (ORCPT ); Wed, 6 Jun 2012 11:11:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8119 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753018Ab2FFPLS (ORCPT ); Wed, 6 Jun 2012 11:11:18 -0400 Date: Wed, 6 Jun 2012 17:08:48 +0200 From: Oleg Nesterov To: Ananth N Mavinakayanahalli Cc: linuxppc-dev@lists.ozlabs.org, lkml , Paul Mackerras , benh@kernel.crashing.org, Srikar Dronamraju , Anton Blanchard , Ingo Molnar , peterz@infradead.org Subject: Re: [PATCH 1/2] uprobes: Pass probed vaddr to arch_uprobe_analyze_insn() Message-ID: <20120606150848.GA24641@redhat.com> References: <20120606091950.GB6745@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120606091950.GB6745@in.ibm.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 879 Lines: 22 On 06/06, Ananth N Mavinakayanahalli wrote: > > From: Ananth N Mavinakayanahalli > > On RISC architectures like powerpc, instructions are fixed size. > Instruction analysis on such platforms is just a matter of (insn % 4). > Pass the vaddr at which the uprobe is to be inserted so that > arch_uprobe_analyze_insn() can flag misaligned registration requests. And the next patch checks "vaddr & 0x03". But why do you need this new arg? arch_uprobe_analyze_insn() could check "container_of(auprobe, struct uprobe, arch)->offset & 0x3" with the same effect, no? vm_start/vm_pgoff are obviously page-aligned. Oleg. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/