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: Fri, 6 Jan 2006 13:29:19 +0800
- Subject: RE: Review patches of user space kprobe
>>-----Original Message-----
>>From: Prasanna S Panchamukhi [mailto:prasanna@in.ibm.com]
>>Sent: 2006年1月5日 19:10
>>To: Zhang, Yanmin
>>Cc: systemtap@sources.redhat.com; Keshavamurthy, Anil S; Mao, Bibo
>>Subject: Re: Review patches of user space kprobe
>>>
>>>
>>> >>+ kprobe_page_mapped = 1;
>>> >>+ retval = insert_probe_page(up);
>>> >>+ }
>>> >>+ }
>>> >>+ }
>>> >>+ if (kprobe_page_mapped) {
>>> The logic here is incorrect. If there are many uprobes at the same page,
>>> up just points to the last one. How about others?
>>>
>>
>>readpage() routine reads one page at a time. we map the page one time and walk the
>>probes list for this inode, insert all the probes within this page and then unmap it.
Yes, I did see codes inserting all the probes on the page, but below codes:
+ if (kprobe_page_mapped) {
+ unmap_uprobe_page(up);
+ unlock_page(up->page);
+ }
are only executed after the loop of hlist_for_each_entry. Is it correct?