From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Wenji Huang <wenji.huang@oracle.com>
Cc: systemtap@sourceware.org
Subject: Re: multip register_uprobe
Date: Fri, 06 Jul 2007 12:35:00 -0000 [thread overview]
Message-ID: <20070706123519.GC31528@linux.vnet.ibm.com> (raw)
In-Reply-To: <468DF726.9090808@oracle.com>
Hi Wenji,
> I am creating some test scripts based on sarikar's framework.
>
> There is one problem about register multiple times.
> .................
> probes->vaddr = vaddr;
> probes->pid = pid;
> probes->handler = handler;
> for (i=0; i < 3; i++) {
> ret = register_uprobe(probes);
> if (ret!=0) //of course, the first time should succeed and
> will failed in second time, ret = -16
> {
> I tried several possibilities:
> * return ret; //RESULT: the module can't be removed,
> the probed process will hang, can't be killed/continued
> * return 0; //RESULT: same as above
> * unregister_uprobe(probes);kfree(probes);break;
> //RESULT: same as above
> * kfree(probes);break; //RESULT: the module can be
> removed, the probed process will hang, can't be killed/continued
> }
> }
> return 0;
uprobes doesn't allow to register using the same probe structure.
Thats currently documented in the Documentation/uprobes.txt
Under Uprobes features and Limitations.
Uprobes may produce unexpected results if you:
- assign non-zero values to reserved members of struct uprobe;
- change the contents of a uprobe or uretprobe object while it is
registered; or
- attempt to register a uprobe or uretprobe that is already registered.
Please do let me know if I it doesn't answer or if I have misunderstood
your query.
--
Thanks and Regards
Srikar
next prev parent reply other threads:[~2007-07-06 12:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-06 8:03 Wenji Huang
2007-07-06 12:35 ` Srikar Dronamraju [this message]
2007-07-06 17:37 ` Jim Keniston
2007-07-06 18:50 ` Jim Keniston
2007-07-09 8:19 ` Wenji Huang
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=20070706123519.GC31528@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=systemtap@sourceware.org \
--cc=wenji.huang@oracle.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).