summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroland <roland>2005-08-25 01:14:57 +0000
committerroland <roland>2005-08-25 01:14:57 +0000
commite50a0b1b1d96d74e95ea332a237521cdafd8a257 (patch)
treed6f504089659f0f45e3e60dd5c6c879f1debfb1b
parent7e1279ea10e599ebadd117b6ee952dd582cb25ab (diff)
downloadsystemtap-steved-e50a0b1b1d96d74e95ea332a237521cdafd8a257.tar.gz
systemtap-steved-e50a0b1b1d96d74e95ea332a237521cdafd8a257.tar.xz
systemtap-steved-e50a0b1b1d96d74e95ea332a237521cdafd8a257.zip
2005-08-24 Roland McGrath <roland@redhat.com>
* loc2c-runtime.h (deref_string): New macro.
-rw-r--r--runtime/loc2c-runtime.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/loc2c-runtime.h b/runtime/loc2c-runtime.h
index ca26aa3b..aa6823fd 100644
--- a/runtime/loc2c-runtime.h
+++ b/runtime/loc2c-runtime.h
@@ -171,3 +171,10 @@
})
#endif
+
+#define deref_string(dst, addr, maxbytes)
+ ({
+ if (__strncpy_from_user ((dst), (const char __user *) (addr), (maxbytes)))
+ goto deref_fault;
+ (dst);
+ })