summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2010-03-11 12:52:26 -0800
committerJosh Stone <jistone@redhat.com>2010-03-11 12:52:26 -0800
commit33feeb259c00ed8b3eabea98c9891316582e439e (patch)
tree3a34777060c84fe7e4c30fd96e4c866176eb4b43
parentdf841db1a8a3dd18228edc20b12044d5d31001a5 (diff)
downloadsystemtap-steved-33feeb259c00ed8b3eabea98c9891316582e439e.tar.gz
systemtap-steved-33feeb259c00ed8b3eabea98c9891316582e439e.tar.xz
systemtap-steved-33feeb259c00ed8b3eabea98c9891316582e439e.zip
Revoke unprivileged from ftrace()
It's writing into a system-wide resource, so it shouldn't be permitted to just anyone. Also remove the printk fallback that isn't actually functional. * tapset/logging.stp (ftrace): Remove unprivileged and printk.
-rw-r--r--tapset/logging.stp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tapset/logging.stp b/tapset/logging.stp
index a8ce95c4..957b2782 100644
--- a/tapset/logging.stp
+++ b/tapset/logging.stp
@@ -71,14 +71,14 @@ function stp_print_binary(n:long, arg1:long, arg2:long, arg3:long, arg4:long) %{
/**
- * sfunction ftrace - Send a message to the ftrace ring-buffer (or else printk).
+ * sfunction ftrace - Send a message to the ftrace ring-buffer.
* @msg: The formatted message string.
*
* Description: If the ftrace ring-buffer is configured & available,
* see /debugfs/tracing/trace for the message. Otherwise, the
* message may be quietly dropped. An implicit end-of-line is added.
*/
-function ftrace (msg:string) %{ /* unprivileged */
+function ftrace (msg:string) %{
#ifdef STAPCONF_TRACE_PRINTK
static char *fmt = "%s\n";
trace_printk (fmt, THIS->msg);
@@ -87,7 +87,5 @@ function ftrace (msg:string) %{ /* unprivileged */
to defeat trace_printk -> __trace_bprintk optimization. That's
because bprintk doesn't save the incoming strings, only their
addresses. */
-#else
- /* printk(KERN_DEBUG "%s\n", THIS->msg); */
#endif
%}