public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Prasanna S Panchamukhi <prasanna@in.ibm.com>
To: "Zhang, Yanmin" <yanmin.zhang@intel.com>
Cc: systemtap@sources.redhat.com,         "Keshavamurthy,
	Anil S" <anil.s.keshavamurthy@intel.com>,
	        "Mao, Bibo" <bibo.mao@intel.com>
Subject: Re: Review patches of user space kprobe
Date: Fri, 06 Jan 2006 08:53:00 -0000	[thread overview]
Message-ID: <20060106085648.GD18495@in.ibm.com> (raw)
In-Reply-To: <8126E4F969BA254AB43EA03C59F44E840464C20C@pdsmsx404>

> >>>uprobes in uprobe_module. Uprobes just need keep its own specific info.
> >>
> >>inode and offset combination uniquely identifies individual user space
> >>probe,
> What does "individual user space probe" mean here? 
> 

Here individual user space probe mean, the place where the breakpoint 
instruction is inserted. 

>Any uprobe will be shared by all processes who map the same page. Right?

that's right.

> 
>  hence when a probe is hit, combination inode and offset is used to
> >>identify each probe. Keeping inode pointer in struct uprobe clearly
> >>reflects this concept.
> What's the relationship between uprobe and uprobe_module? All uprobes linked by uprobe_module->ulist_head have the same inode, right? If it's correct, why not to just include inode in uprobe_module?

This can be done, but in such a case for every probe hit, the uprobe_module list much be traversed just to get the inode.

> >>>>		struct vm_area_struct *vma;
> >>>Item page and vma are used temporarily. They are not used when the probe
> >>>is hit. To shrink struct uprobe, they could be deleted. A new super
> >>>struct could be defined to include struct uprobe, or always to search
> >>>them when they are needed. Application might be inserted huge uprobes.
> >>>It's better to keep the struct smaller.
> >>
> >>If vma's are temporarily defined, then readpage hooks should walk
> >>through the vma list to get the vma. To reduce the time spent in
> >>readpage/readpages hooks in fastpath, we store it while registeration.
> Incorrect. This vma only represents one process who maps the page. How about other processes who map the same page?

Do you mean the same page is mapped in different vma?
As of now we are not supporting such cases.

> >>understand what you mean by "assign a fixed address in user space"
> map_uprobe_page sets uprobe->kp.addr to address returned by kmap_atomic, then insert_probe_page will add offset to uprobe->kp.addr. Later, register_kprobe uses uprobe->kp.addr to estimate if the address is in kernel text. Is it wrong? As for why you didn't hit it, I think mostly now uprobe->kp.addr is pointing to the kernel data area, but it doesn't point to user space. Right? 

This is done to make use of register_kprobe(), the address returned by 
kmap_atomic is passed to register_kprobe() and even though the kernel data 
address is stored at kp.addr, that is enough to distinguish between 
kernel probes.

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

  reply	other threads:[~2006-01-06  8:53 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-06  3:20 Zhang, Yanmin
2006-01-06  8:53 ` Prasanna S Panchamukhi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-01-09  2:06 Zhang, Yanmin
2006-01-09  2:04 Zhang, Yanmin
2006-01-09  1:48 Zhang, Yanmin
2006-01-06  9:12 Zhang, Yanmin
2006-01-06  9:28 ` Prasanna S Panchamukhi
2006-01-06  9:08 Zhang, Yanmin
2006-01-06 10:22 ` Prasanna S Panchamukhi
2006-01-06 10:30   ` Roland McGrath
2006-01-06  5:29 Zhang, Yanmin
2006-01-06  9:08 ` Prasanna S Panchamukhi
2006-01-06  5:22 Zhang, Yanmin
2006-01-06  9:04 ` Prasanna S Panchamukhi
2006-01-06  4:27 Zhang, Yanmin
2006-01-06 12:28 ` Prasanna S Panchamukhi
2006-01-06  2:52 Zhang, Yanmin
2006-01-06  6:53 ` Prasanna S Panchamukhi
2006-01-05  7:09 Zhang, Yanmin
2006-01-05 11:27 ` Prasanna S Panchamukhi
2005-12-22 13:24 Zhang, Yanmin
2006-01-05 11:10 ` Prasanna S Panchamukhi
2005-12-22  7:14 Zhang, Yanmin
2005-12-22  5:41 Zhang, Yanmin
2005-12-22  6:00 ` Vara Prasad
2006-01-05 11:06 ` Prasanna S Panchamukhi
2005-12-22  5:34 Zhang, Yanmin
2006-01-05 10:30 ` Prasanna S Panchamukhi
2005-12-22  5:09 Zhang, Yanmin
2006-01-05 10:29 ` Prasanna S Panchamukhi
2005-12-21  8:31 Zhang, Yanmin
2006-01-05 10:28 ` Prasanna S Panchamukhi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060106085648.GD18495@in.ibm.com \
    --to=prasanna@in.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=bibo.mao@intel.com \
    --cc=systemtap@sources.redhat.com \
    --cc=yanmin.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).