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: Review patches of user space kprobe


> >>> >>+							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))
> Incorrect. get_uprobe, the caller of get_uprobe_at, might be crazy. current_uprobe might be set as up and get_user_page(up) is called incorrectly. The logic is *not clear*.

This was all done to handle aggrigate uprobes. get_uprobe() is called after 
checking if the address is not kernel_text_address(). get_uprobe_at() returns 
kprobe structures from the kprobe hash list. If the kprobe structure returned 
is a aggrigate kprobe structure, the aggrigate hash list is walked to get the 
individual kprobe structure that is included in the uprobe structure. The page 
containing the probe address is located and locked in the memory, so that the
breakpoint instruction can be replaced with original instruction, if the single
stepping out-of-line could not be achieved. But as of now we are not handling
the case when single stepping out-of-line fails, which need to be handled.

Thanks
Prasanna
-- 
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Email: prasanna@in.ibm.com
Ph: 91-80-25044636


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