Summary: | make probefunc unprivileged | ||
---|---|---|---|
Product: | systemtap | Reporter: | Frank Ch. Eigler <fche> |
Component: | tapsets | Assignee: | Unassigned <systemtap> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mark, smakarov |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Frank Ch. Eigler
2012-02-15 11:48:30 UTC
Should we just recommend pn() and pp() which are unprivileged? > Should we just recommend pn() and pp() which are unprivileged?
Not so simple; for para-callgraph*, we don't want boilerplate
substrings of the pp/pn(), just the plain function names.
Building on tapset improvements from PR6580, I implemented a preprocessor conditional of the form %( systemtap_privilege == "privileged" / "unprivileged" %? ... %: ... %). The probefunc() implementation now wraps all kernel-space retrieval code in such a conditional, eliding it when compiled with a lower privilege, while leaving the user-space code available. This allows unprivileged use of probefunc() handily, while retaining backwards compatibility with its kernel-space uses for privileged scripts (no deprecation/rewriting necessary). For instance, para-callgraph* and such can now be run in unprivileged mode, so long as the probe points they're handed are appropriate of course. It remains to document the new systemtap_privilege check in order to make it available and documented if we want to consider it for similar uses in the future. (i.e. for having a tapset function provide a subset of the normal functionality in unprivileged mode) |