This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: Review patches of user space kprobe
- From: "Zhang, Yanmin" <yanmin dot zhang at intel dot com>
- To: <prasanna at in dot ibm dot com>
- Cc: <systemtap at sources dot redhat dot com>, "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, "Mao, Bibo" <bibo dot mao at intel dot com>
- Date: Thu, 22 Dec 2005 15:13:56 +0800
- Subject: RE: Review patches of user space kprobe
Below inline are the comments for patch 3/3.
Yanmin
>>Signed-of-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
>>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 = &kprobe_table[hash_long((unsigned long)inode * offset,
>>+ KPROBE_HASH_BITS)];
>>+ hlist_for_each_entry(p, node, head, hlist) {
>>+ if (p->pre_handler == aggr_pre_handler)
>>+ return p;
>>+ else {
>>+ struct uprobe *user = container_of(p,
>>+ struct uprobe,
kp);
Kprobe and uprobe share the same hash table. Does p here always point to
uprobe?