diff options
Diffstat (limited to 'tapset/conversions.stp')
-rw-r--r-- | tapset/conversions.stp | 9 |
1 files changed, 5 insertions, 4 deletions
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; } %} |