summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-11-09 14:50:52 -0500
committerDave Brolley <brolley@redhat.com>2009-11-09 14:50:52 -0500
commit64211010978d0e35c80ec7c119f1986a48f97543 (patch)
tree4a9d67ed8f7682cf8eb61686709fd69341394e63 /tapsets.cxx
parent5e90af3e298ae39838acedf85f1301806143e920 (diff)
downloadsystemtap-steved-64211010978d0e35c80ec7c119f1986a48f97543.tar.gz
systemtap-steved-64211010978d0e35c80ec7c119f1986a48f97543.tar.xz
systemtap-steved-64211010978d0e35c80ec7c119f1986a48f97543.zip
Don't reference global variable modpath in insert_module and its helpers.
This allows insert_module to to be used for loading the signed uprobes.ko module. Allow the use of $$parms and $$return in uprobes based probes for unprivileged users. Re-add management of module signatures in the cache. Don't know why it was removed.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index d2c33349..6566c89f 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -358,6 +358,9 @@ struct dwarf_derived_probe: public derived_probe
void emit_probe_local_init(translator_output * o);
void getargs(std::set<std::string> &arg_set) const;
+ void emit_unprivileged_assertion (translator_output*);
+ void print_dupe_stamp(ostream& o);
+
// Pattern registration helpers.
static void register_statement_variants(match_node * root,
dwarf_builder * dw);
@@ -672,6 +675,11 @@ struct dwarf_builder: public derived_probe_builder
probe_point * location,
literal_map_t const & parameters,
vector<derived_probe *> & finished_results);
+
+ // No action required. These probes are allowed for unprivileged users.
+ // as process owners.
+ virtual void check_unprivileged (const systemtap_session & sess,
+ const literal_map_t & parameters) {}
};
@@ -2307,6 +2315,8 @@ dwarf_var_expanding_visitor::visit_target_symbol (target_symbol *e)
if (! lvalue)
ec->code += "/* pure */";
+
+ ec->code += "/* unprivileged */";
}
catch (const semantic_error& er)
{
@@ -2950,6 +2960,24 @@ dwarf_derived_probe::getargs(std::set<std::string> &arg_set) const
void
+dwarf_derived_probe::emit_unprivileged_assertion (translator_output* o)
+{
+ // These probes are allowed for unprivileged users, but only in the
+ // context of processes which they own.
+ emit_process_owner_assertion (o);
+}
+
+
+void
+dwarf_derived_probe::print_dupe_stamp(ostream& o)
+{
+ // These probes are allowed for unprivileged users, but only in the
+ // context of processes which they own.
+ print_dupe_stamp_unprivileged_process_owner (o);
+}
+
+
+void
dwarf_derived_probe::register_statement_variants(match_node * root,
dwarf_builder * dw)
{
@@ -5569,6 +5597,8 @@ tracepoint_var_expanding_visitor::visit_target_symbol_arg (target_symbol* e)
else
ec->code += "/* pure */";
+ ec->code += "/* unprivileged */";
+
dw.sess.functions[fdecl->name] = fdecl;
// Synthesize a functioncall.