summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-09-14 11:58:22 -0400
committerDave Brolley <brolley@redhat.com>2009-09-14 11:58:22 -0400
commitd2c9ec9b6933fbe36834d7ad52be0994e96eb12c (patch)
treeb643f2c742d1fc1ea5e16ad9a6bc77481d88449c
parent6db2f61f39669ad1f0fa23595b94ff22c8fc50d6 (diff)
downloadsystemtap-steved-d2c9ec9b6933fbe36834d7ad52be0994e96eb12c.tar.gz
systemtap-steved-d2c9ec9b6933fbe36834d7ad52be0994e96eb12c.tar.xz
systemtap-steved-d2c9ec9b6933fbe36834d7ad52be0994e96eb12c.zip
Allow remaining process.* probes for unprivileged users.
-rwxr-xr-xstap-server2
-rw-r--r--tapset-itrace.cxx16
-rw-r--r--tapset-utrace.cxx4
-rw-r--r--tapsets.cxx23
4 files changed, 34 insertions, 11 deletions
diff --git a/stap-server b/stap-server
index 316cc954..e6855341 100755
--- a/stap-server
+++ b/stap-server
@@ -377,7 +377,7 @@ function package_response {
# Compress the server's temporary directory into a .zip archive.
(rm $zip_server && zip -r $zip_server `basename $tmpdir_server` > /dev/null) || \
- fatal "zip of request tree, $tmpdir_server, failed"
+ fatal "zip of server response tree, $tmpdir_server, failed"
}
# function: fatal [ MESSAGE ]
diff --git a/tapset-itrace.cxx b/tapset-itrace.cxx
index dee2fe64..9fc59d42 100644
--- a/tapset-itrace.cxx
+++ b/tapset-itrace.cxx
@@ -299,10 +299,18 @@ register_tapset_itrace(systemtap_session& s)
match_node* root = s.pattern_root;
derived_probe_builder *builder = new itrace_builder();
- root->bind_str(TOK_PROCESS)->bind(TOK_INSN)->bind(builder);
- root->bind_num(TOK_PROCESS)->bind(TOK_INSN)->bind(builder);
- root->bind_str(TOK_PROCESS)->bind(TOK_INSN)->bind(TOK_BLOCK)->bind(builder);
- root->bind_num(TOK_PROCESS)->bind(TOK_INSN)->bind(TOK_BLOCK)->bind(builder);
+ root->bind_str(TOK_PROCESS)->bind(TOK_INSN)
+ ->allow_unprivileged()
+ ->bind(builder);
+ root->bind_num(TOK_PROCESS)->bind(TOK_INSN)
+ ->allow_unprivileged()
+ ->bind(builder);
+ root->bind_str(TOK_PROCESS)->bind(TOK_INSN)->bind(TOK_BLOCK)
+ ->allow_unprivileged()
+ ->bind(builder);
+ root->bind_num(TOK_PROCESS)->bind(TOK_INSN)->bind(TOK_BLOCK)
+ ->allow_unprivileged()
+ ->bind(builder);
}
diff --git a/tapset-utrace.cxx b/tapset-utrace.cxx
index 490af20f..22682776 100644
--- a/tapset-utrace.cxx
+++ b/tapset-utrace.cxx
@@ -1040,12 +1040,16 @@ register_tapset_utrace(systemtap_session& s)
->allow_unprivileged()
->bind(builder);
roots[i]->bind(TOK_THREAD)->bind(TOK_BEGIN)
+ ->allow_unprivileged()
->bind(builder);
roots[i]->bind(TOK_THREAD)->bind(TOK_END)
+ ->allow_unprivileged()
->bind(builder);
roots[i]->bind(TOK_SYSCALL)
+ ->allow_unprivileged()
->bind(builder);
roots[i]->bind(TOK_SYSCALL)->bind(TOK_RETURN)
+ ->allow_unprivileged()
->bind(builder);
}
}
diff --git a/tapsets.cxx b/tapsets.cxx
index 5b3e9169..225db319 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -2915,12 +2915,21 @@ dwarf_derived_probe::register_patterns(systemtap_session& s)
register_function_and_statement_variants(root->bind(TOK_KERNEL), dw);
register_function_and_statement_variants(root->bind_str(TOK_MODULE), dw);
- root->bind(TOK_KERNEL)->bind_num(TOK_STATEMENT)->bind(TOK_ABSOLUTE)->bind(dw);
- root->bind(TOK_KERNEL)->bind_str(TOK_FUNCTION)->bind_str(TOK_LABEL)->bind(dw);
- root->bind_str(TOK_PROCESS)->bind_str(TOK_FUNCTION)->bind_str(TOK_LABEL)->bind(dw);
- register_function_and_statement_variants(root->bind_str(TOK_PROCESS), dw, false/*!unprivileged_ok_p*/);
- root->bind_str(TOK_PROCESS)->bind_str(TOK_MARK)->bind(dw);
- root->bind_str(TOK_PROCESS)->bind_num(TOK_MARK)->bind(dw);
+ root->bind(TOK_KERNEL)->bind_num(TOK_STATEMENT)->bind(TOK_ABSOLUTE)
+ ->bind(dw);
+ root->bind(TOK_KERNEL)->bind_str(TOK_FUNCTION)->bind_str(TOK_LABEL)
+ ->bind(dw);
+
+ register_function_and_statement_variants(root->bind_str(TOK_PROCESS), dw, true/*unprivileged_ok_p*/);
+ root->bind_str(TOK_PROCESS)->bind_str(TOK_FUNCTION)->bind_str(TOK_LABEL)
+ ->allow_unprivileged()
+ ->bind(dw);
+ root->bind_str(TOK_PROCESS)->bind_str(TOK_MARK)
+ ->allow_unprivileged()
+ ->bind(dw);
+ root->bind_str(TOK_PROCESS)->bind_num(TOK_MARK)
+ ->allow_unprivileged()
+ ->bind(dw);
}
void
@@ -6249,9 +6258,11 @@ register_standard_tapsets(systemtap_session & s)
// XXX: user-space starter set
s.pattern_root->bind_num(TOK_PROCESS)
->bind_num(TOK_STATEMENT)->bind(TOK_ABSOLUTE)
+ ->allow_unprivileged()
->bind(new uprobe_builder ());
s.pattern_root->bind_num(TOK_PROCESS)
->bind_num(TOK_STATEMENT)->bind(TOK_ABSOLUTE)->bind(TOK_RETURN)
+ ->allow_unprivileged()
->bind(new uprobe_builder ());
// kernel tracepoint probes