Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752262Ab1DSNkF (ORCPT ); Tue, 19 Apr 2011 09:40:05 -0400 Received: from casper.infradead.org ([85.118.1.10]:38009 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751908Ab1DSNkE convert rfc822-to-8bit (ORCPT ); Tue, 19 Apr 2011 09:40:04 -0400 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: 8BIT Date: Tue, 19 Apr 2011 15:39:19 +0200 Message-ID: <1303220359.8345.1.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1047 Lines: 22 On Fri, 2011-04-01 at 20:05 +0530, Srikar Dronamraju wrote: > + probept = uprobes_get_bkpt_addr(regs); > + down_read(&mm->mmap_sem); > + for (vma = mm->mmap; vma; vma = vma->vm_next) { > + if (!valid_vma(vma)) > + continue; > + if (probept < vma->vm_start || probept > vma->vm_end) > + continue; > + u = 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); -- 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/