This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch [1/3] Userspace probes new interfaces


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]