summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tapset/ChangeLog4
-rw-r--r--tapset/conversions.stp9
2 files changed, 9 insertions, 4 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index a1cbf049..7d5ce509 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,7 @@
+2006-04-18 Martin Hunt <hunt@redhat.com>
+
+ * conversions.stp (user_string): Reenable error message.
+
2006-04-17 Martin Hunt <hunt@redhat.com>
* endian.stp (set_endian): New function.
diff --git a/tapset/conversions.stp b/tapset/conversions.stp
index c0e42cc5..d46f8c18 100644
--- a/tapset/conversions.stp
+++ b/tapset/conversions.stp
@@ -29,15 +29,16 @@ success: ;
%}
# NB: accessing user space is hazardous from certain kernel contexts.
+# Errors should be returned when this is detected.
function user_string:string (addr:long) %{
long rc = _stp_strncpy_from_user (THIS->__retvalue,
(const char __user*) (uintptr_t) THIS->addr,
MAXSTRINGLEN);
if (rc < 0)
{
-// static char errmsg[40];
-// snprintf (errmsg, 40, "user string copy fault at 0x%p",
-// (void *) (uintptr_t) THIS->addr);
-// CONTEXT->last_error = errmsg;
+ static char errmsg[40];
+ snprintf (errmsg, 40, "user string copy fault at 0x%p",
+ (void *) (uintptr_t) THIS->addr);
+ CONTEXT->last_error = errmsg;
}
%}