This is the mail archive of the
mailing list for the systemtap project.
[Bug uprobes/5163] tweak uprobes.ko build process
- From: "jkenisto at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 11 Oct 2007 23:01:53 -0000
- Subject: [Bug uprobes/5163] tweak uprobes.ko build process
- References: <email@example.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jkenisto at us dot ibm dot com 2007-10-11 23:01 -------
(In reply to comment #0)
These are valid concerns, but I think the solutions need further thought. See
One thing to keep in mind is that we don't expect uprobes.ko to be insmod-ed and
rmmod-ed every time somebody runs a stap script. Rather, once uprobes is in the
kernel, it stays there. (As mentioned in bugs #5079 and #5083, sometimes
uprobes has to hang around long after the last unregister.) The typical
scenario is that when it's time to insmod a stap-generated module, uprobes is
already in the kernel (which we can detect becauses the uprobes symbols show up
We can certainly handle somebody rmmod-ing uprobes (in which case we
automatically rebuild it and/or re-insmod it as necessary), but that's not the
The only times we try to build uprobes.ko are:
1. we're stopping after pass 4 (in case uprobes.ko is needed in the environment
where the script will eventually be run); or
2. we're proceeding to pass 5 and we don't see uprobes in the kernel...
... and the script needs uprobes, of course.
> We need to tweak some of the uprobes.ko build steps from bug #5079.
> Several problems: /usr/share/systemtap/runtime/uprobes is the wrong place
> to build an object file into; /usr could be read-only;
And a user from group stapdev doesn't have write access to the directory where
stap currently tries to build uprobes.ko. You'd have to run stap as root for
the build to succeed.
> the file may not be
> easily accessible to staprun except in the local/immediate probing scenario;
Yes, if you move the stap-generated module to another system, you may need to
bring uprobes.ko with it.
> uprobes.ko is kernel-version/arch. dependent, just like the systemtap probe
> Let's investigate building the uprobes.ko more similarly to probe modules.
> It could be stored in the module cache directory ($SYSTEMTAP_DIR/uprobes/).
Since each stap user has his/her own cache directory (by default), this would
mean multiple copies of uprobes.ko (and possibly the uprobes source).
> It could be given a name that encodes the version/architecture parameters
> (so the cache directory itself can be shared between machines). Instead
> of passing just "-u" to staprun and have it find uprobes.ko someplace,
> pass "UPROBEFILENAME.ko" itself in addition ot the "PROBEFILE.ko".
> "stap -p4" could itself print out both needed modules.
What |Removed |Added
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.