summaryrefslogtreecommitdiffstats
path: root/runtime/print.c
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2009-09-16 22:32:28 -0400
committerFrank Ch. Eigler <fche@elastic.org>2009-09-16 22:37:24 -0400
commit6ecd877049008c5abe9c6720ea8fc64732f47eb5 (patch)
tree407a536c1271b8e5757899e461c481e599266d67 /runtime/print.c
parent6846cfc8a5cdb24fccb19037b27a180d2300ee09 (diff)
downloadsystemtap-steved-6ecd877049008c5abe9c6720ea8fc64732f47eb5.tar.gz
systemtap-steved-6ecd877049008c5abe9c6720ea8fc64732f47eb5.tar.xz
systemtap-steved-6ecd877049008c5abe9c6720ea8fc64732f47eb5.zip
PR10650: markup some unprivileged-safe tapset functions
Add /* unprivileged */ to a variety of tapset embedded-c functions, together with uid-assertion-checking code as needed. This is only an initial set, and may need to grow or shrink after further testing. Prototyped-By: Dave Brolley <brolley@redhat.com> * runtime/runtime.h (is_myproc, assert_is_myproc): New macros. * runtime/addr-map.c (lookup_bad_addr): Reject if !is_myproc in unprivileged mode. * runtime/print.c (_stp_print_kernel_info): Add unprivileged mode info. * tapset/DEVGUIDE: Document /* pure */ and /* unprivileged */. * tapset/*.stp: Add /* unprivileged */ here and there, in questionable cases along with an assert_is_myproc().
Diffstat (limited to 'runtime/print.c')
-rw-r--r--runtime/print.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/runtime/print.c b/runtime/print.c
index 945f7a72..335403fb 100644
--- a/runtime/print.c
+++ b/runtime/print.c
@@ -225,7 +225,11 @@ static void _stp_print_kernel_info(char *vstr, int ctx, int num_probes)
#ifdef DEBUG_MEM
"+alloc"
#endif
- ", probes: %d\n",
+ ", probes: %d"
+#ifndef STP_PRIVILEGED
+ ", unpriv-uid: %d"
+#endif
+ "\n",
THIS_MODULE->name,
vstr,
#ifndef STAPCONF_GRSECURITY
@@ -242,7 +246,11 @@ static void _stp_print_kernel_info(char *vstr, int ctx, int num_probes)
#ifdef DEBUG_MEM
_stp_allocated_memory - _stp_allocated_net_memory,
#endif
- num_probes);
+ num_probes
+#ifndef STP_PRIVILEGED
+ , _stp_uid
+#endif
+ );
}
/** @} */