From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14778 invoked by alias); 22 Dec 2005 07:14:03 -0000 Received: (qmail 14771 invoked by uid 22791); 22 Dec 2005 07:14:02 -0000 X-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,DNS_FROM_RFC_POST X-Spam-Check-By: sourceware.org Received: from fmr18.intel.com (HELO orsfmr003.jf.intel.com) (134.134.136.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 Dec 2005 07:14:01 +0000 Received: from orsfmr100.jf.intel.com (orsfmr100.jf.intel.com [10.7.209.16]) by orsfmr003.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 jBM7Dwmd015496; Thu, 22 Dec 2005 07:13:58 GMT Received: from pdsmsxvs01.pd.intel.com (pdsmsxvs01.pd.intel.com [172.16.12.122]) by orsfmr100.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 jBM7DegH006634; Thu, 22 Dec 2005 07:13:58 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 M2005122215135715007 ; Thu, 22 Dec 2005 15:13:57 +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); Thu, 22 Dec 2005 15:13:57 +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="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Review patches of user space kprobe Date: Thu, 22 Dec 2005 13:24:00 -0000 Message-ID: <8126E4F969BA254AB43EA03C59F44E840447BE94@pdsmsx404> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Review patches of user space kprobe Thread-Index: AcYFUmXZTeBzN902Ro6gR+ou3K1AMwAn0RrgACsLjBAABfJB8AAAZ87QAAMKW9A= From: "Zhang, Yanmin" To: Cc: , "Keshavamurthy, Anil S" , "Mao, Bibo" X-OriginalArrivalTime: 22 Dec 2005 07:13:57.0595 (UTC) FILETIME=[466572B0:01C606C7] X-Scanned-By: MIMEDefang 2.52 on 10.7.209.16 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: 2005-q4/txt/msg00544.txt.bz2 Below inline are the comments for patch 3/3. Yanmin >>Signed-of-by: Prasanna S Panchamukhi >>diff -puN kernel/kprobes.c~kprobes_userspace_probes-handlers kernel/kprobes.c >>--- linux-2.6.13/kernel/kprobes.c~kprobes_userspace_probes-handlers 2005-09-14 11:49:28.780123648 +0530 >>+++ linux-2.6.13-prasanna/kernel/kprobes.c 2005-09-14 11:49:28.835115288 +0530 >>@@ -52,7 +52,8 @@ static struct list_head uprobe_module_li >>+/* >>+ * Walk through the kprobe hlist and get the matching userspace probe >>+ * structure with the given inode and offset. >>+ */ >>+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?