From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e2.ny.us.ibm.com (e2.ny.us.ibm.com [32.97.182.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e2.ny.us.ibm.com", Issuer "Equifax" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 0FC54B6FBA for ; Wed, 6 Jun 2012 21:47:59 +1000 (EST) Received: from /spool/local by e2.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 6 Jun 2012 07:47:54 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 49A3F6E804A for ; Wed, 6 Jun 2012 07:47:28 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q56BlSSf156330 for ; Wed, 6 Jun 2012 07:47:28 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q56BlQQf013483 for ; Wed, 6 Jun 2012 07:47:27 -0400 Date: Wed, 6 Jun 2012 17:14:23 +0530 From: Srikar Dronamraju To: Ingo Molnar Subject: Re: [PATCH 1/2] uprobes: Pass probed vaddr to arch_uprobe_analyze_insn() Message-ID: <20120606114423.GA32094@linux.vnet.ibm.com> References: <20120606091950.GB6745@in.ibm.com> <1338974632.2749.87.camel@twins> <20120606093744.GB29580@in.ibm.com> <20120606094014.GD9495@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <20120606094014.GD9495@gmail.com> Cc: Peter Zijlstra , lkml , oleg@redhat.com, Paul Mackerras , Anton Blanchard , Ingo Molnar , linuxppc-dev@lists.ozlabs.org Reply-To: Srikar Dronamraju List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , * Ingo Molnar [2012-06-06 11:40:15]: > > * Ananth N Mavinakayanahalli wrote: > > > On Wed, Jun 06, 2012 at 11:23:52AM +0200, Peter Zijlstra wrote: > > > On Wed, 2012-06-06 at 14:49 +0530, Ananth N Mavinakayanahalli wrote: > > > > +int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, loff_t vaddr) > > > > > > Don't we traditionally use unsigned long to pass vaddrs? > > > > Right. But the vaddr we pass here is vma_info->vaddr which is loff_t. > > I guess I should've made that clear in the patch description. > > Why not fix struct vma_info's vaddr type? > Calculating and comparing vaddr results either uses variables of type loff_t. To avoid typecasting and avoid overflow at each of these places, we used loff_t. Ananth, install_breakpoint() already has a variable of type addr of type unsigned long. Why dont you use addr instead of vaddr. -- Thanks and regards Srikar