From 6ecd877049008c5abe9c6720ea8fc64732f47eb5 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 16 Sep 2009 22:32:28 -0400 Subject: 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 * 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(). --- tapset/timestamp_gtod.stp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tapset/timestamp_gtod.stp') diff --git a/tapset/timestamp_gtod.stp b/tapset/timestamp_gtod.stp index b916a3b1..acf525f0 100644 --- a/tapset/timestamp_gtod.stp +++ b/tapset/timestamp_gtod.stp @@ -17,7 +17,7 @@ * * Return the number of nanoseconds since the UNIX epoch. */ -function gettimeofday_ns:long () %{ /* pure */ +function gettimeofday_ns:long () %{ /* pure */ /* unprivileged */ /* NOTE: we can't use do_gettimeofday because we could be called from a * context where xtime_lock is already held. See bug #2525. */ THIS->__retvalue = _stp_gettimeofday_ns(); -- cgit