This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Review patches of user space kprobe
- From: Prasanna S Panchamukhi <prasanna at in dot ibm dot com>
- To: "Zhang, Yanmin" <yanmin dot zhang at intel 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, 5 Jan 2006 16:43:57 +0530
- Subject: Re: Review patches of user space kprobe
- References: <8126E4F969BA254AB43EA03C59F44E840447BE94@pdsmsx404>
- Reply-to: prasanna at in dot ibm dot com
> >>+ */
> >>+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?
Check can be made before accessig uprobe.
if (!kernel_text_address((unsigned long)p->addr))
Thanks
Prasanna
--
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-25044636