From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20550 invoked by alias); 19 Apr 2011 13:40:18 -0000 Received: (qmail 20514 invoked by uid 22791); 19 Apr 2011 13:40:17 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from casper.infradead.org (HELO casper.infradead.org) (85.118.1.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Apr 2011 13:40:00 +0000 Received: from j77219.upc-j.chello.nl ([24.132.77.219] helo=twins) by casper.infradead.org with esmtpsa (Exim 4.72 #1 (Red Hat Linux)) id 1QCB9c-0002Hz-T8; Tue, 19 Apr 2011 13:39:44 +0000 Received: by twins (Postfix, from userid 1000) id 7C3A184ED693; Tue, 19 Apr 2011 15:39:19 +0200 (CEST) Subject: Re: [PATCH v3 2.6.39-rc1-tip 15/26] 15: uprobes: Handing int3 and singlestep exception. From: Peter Zijlstra To: Srikar Dronamraju Cc: Ingo Molnar , Steven Rostedt , Linux-mm , Arnaldo Carvalho de Melo , Linus Torvalds , Jonathan Corbet , Christoph Hellwig , Masami Hiramatsu , Thomas Gleixner , Ananth N Mavinakayanahalli , Oleg Nesterov , LKML , SystemTap , Jim Keniston , Roland McGrath , Andi Kleen , Andrew Morton In-Reply-To: <20110401143527.15455.32854.sendpatchset@localhost6.localdomain6> References: <20110401143223.15455.19844.sendpatchset@localhost6.localdomain6> <20110401143527.15455.32854.sendpatchset@localhost6.localdomain6> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 19 Apr 2011 13:40:00 -0000 Message-ID: <1303220359.8345.1.camel@twins> Mime-Version: 1.0 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q2/txt/msg00114.txt.bz2 On Fri, 2011-04-01 at 20:05 +0530, Srikar Dronamraju wrote: > + probept =3D uprobes_get_bkpt_addr(regs); > + down_read(&mm->mmap_sem); > + for (vma =3D mm->mmap; vma; vma =3D vma->vm_next) { > + if (!valid_vma(vma)) > + continue; > + if (probept < vma->vm_start || probept > vma->vm_= end) > + continue; > + u =3D find_uprobe(vma->vm_file->f_mapping->host, > + probept - vma->vm_start); > + break; > + } Why the linear vma walk? Surely the find_vma() suffices since there can only be one vma that matches a particular vaddr. > + up_read(&mm->mmap_sem);=20