From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5290 invoked by alias); 6 Jan 2006 02:52:00 -0000 Received: (qmail 5283 invoked by uid 22791); 6 Jan 2006 02:52:00 -0000 X-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_20,DNS_FROM_RFC_POST X-Spam-Check-By: sourceware.org Received: from fmr20.intel.com (HELO orsfmr005.jf.intel.com) (134.134.136.19) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 06 Jan 2006 02:51:58 +0000 Received: from orsfmr101.jf.intel.com (orsfmr101.jf.intel.com [10.7.209.17]) by orsfmr005.jf.intel.com (8.12.10/8.12.10/d: major-outer.mc,v 1.1 2004/09/17 17:50:56 root Exp $) with ESMTP id k062pscH022068; Fri, 6 Jan 2006 02:51:54 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by orsfmr101.jf.intel.com (8.12.10/8.12.10/d: major-inner.mc,v 1.2 2004/09/17 18:05:01 root Exp $) with SMTP id k062ojN0004851; Fri, 6 Jan 2006 02:51:54 GMT Received: from pdsmsx331.ccr.corp.intel.com ([172.16.12.58]) by pdsmsxvs01.pd.intel.com (SAVSMTP 3.1.7.47) with SMTP id M2006010610515309614 ; Fri, 06 Jan 2006 10:51:53 +0800 Received: from pdsmsx404.ccr.corp.intel.com ([172.16.12.64]) by pdsmsx331.ccr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 6 Jan 2006 10:51:53 +0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: quoted-printable Subject: RE: Review patches of user space kprobe Date: Fri, 06 Jan 2006 02:52:00 -0000 Message-ID: <8126E4F969BA254AB43EA03C59F44E840464C1A6@pdsmsx404> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Review patches of user space kprobe Thread-Index: AcYR6QoU+xiueb1CQRaDXCWBx/3DyQAggMlw From: "Zhang, Yanmin" To: Cc: , "Keshavamurthy, Anil S" , "Mao, Bibo" X-OriginalArrivalTime: 06 Jan 2006 02:51:53.0475 (UTC) FILETIME=[26496530:01C6126C] X-Scanned-By: MIMEDefang 2.52 on 10.7.209.17 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q1/txt/msg00024.txt.bz2 >>-----Original Message----- >>From: systemtap-owner@sourceware.org [mailto:systemtap-owner@sourceware.o= rg] On Behalf Of Prasanna S Panchamukhi >>Sent: 2006=C4=EA1=D4=C25=C8=D5 19:14 >>To: Zhang, Yanmin >>Cc: systemtap@sources.redhat.com; Keshavamurthy, Anil S; Mao, Bibo >>Subject: Re: Review patches of user space kprobe >> >>> >>+ */ >>> >>+static struct kprobe *get_uprobe_at(struct inode *inode, unsigned >>> long offset) >>> >>+{ >>> >>+ struct hlist_head *head; >>> >>+ struct hlist_node *node; >>> >>+ struct kprobe *p; >>> >>+ >>> >>+ head =3D &kprobe_table[hash_long((unsigned long)inode * offset, >>> >>+ KPROBE_HASH_BITS)]; >>> >>+ hlist_for_each_entry(p, node, head, hlist) { >>> >>+ if (p->pre_handler =3D=3D aggr_pre_handler) >>> >>+ return p; >>> >>+ else { >>> >>+ struct uprobe *user =3D container_of(p, >>> >>+ struct uprobe, >>> kp); >>> Kprobe and uprobe share the same hash table. Does p here always point to >>> uprobe? >> >>Check can be made before accessig uprobe. >>if (!kernel_text_address((unsigned long)p->addr)) Incorrect. get_uprobe, the caller of get_uprobe_at, might be crazy. current= _uprobe might be set as up and get_user_page(up) is called incorrectly. The= logic is *not clear*.