This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Patch [1/3] Userspace probes new interfaces
- 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: Fri, 27 Jan 2006 18:29:03 +0530
- Subject: Re: Patch [1/3] Userspace probes new interfaces
- References: <99FA2ED298A9834DB1BF5DE8BDBF24130FC998@pdsmsx403>
- Reply-to: prasanna at in dot ibm dot com
Yanmin,
> >>
> >>Please check get_kprobe_user(), p.kp.addr it is used to distinguish
> >>between kernel and user space probes.
> I know get_kprobe_user uses it, but should the uprobe implementation assign an appropriate value to p.kp.addr? It's not good to ask the caller of register_uprobe to do so because the page might be not in memory or not been mapped into the address space of the process.
Another aspect of assigning p.kp.addr, is that even the offset can be
derieved from using the address. The user-space tool can read the
application's elf section and symbol table to calculate the offset
using the address as suggested by Roland.
> >>In the secound case we lookup_pathname() again and then decrement the
> >>writecount (inode->i_writecount).
> [YM] Just before lookup_pathname() again, if the inode is released. So I suggest to delete this function and in its caller, we could call lookup_patchname once, does some check, then copy the temp nameidata to uprobe_module->nd if necessary. There will be no race.
yes, this can be done.
> >>Please check get_kprobe_user(), p.kp.addr it is used to distinguish
> >>between kernel and user space probes.
> [YM] Yes. I still suggest to assign it in uprobe implementation. A fixed address in user space is enough.
Actually, the user should just provide the probe address and pathname of the
application and the user space utility should be able to calculate the
offset and assign it, but as of now we are assigning the offset by hand.
Thanks
Prasanna
--
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-51776329