Skip to content

Commit 4879f11

Browse files
committed
Merge tag 'trace-v5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixes from Steven Rostedt: "This has two fixes for uprobe code. - Cut and paste fix to have uprobe printks say "uprobe" and not "kprobe" - Add terminating '\0' byte when copying function arguments" * tag 'trace-v5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/uprobes: Fix output for multiple string arguments tracing: uprobes: Fix typo in pr_fmt string
2 parents 076a3f5 + 0722069 commit 4879f11

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

kernel/trace/trace_uprobe.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Copyright (C) IBM Corporation, 2010-2012
66
* Author: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
77
*/
8-
#define pr_fmt(fmt) "trace_kprobe: " fmt
8+
#define pr_fmt(fmt) "trace_uprobe: " fmt
99

1010
#include <linux/ctype.h>
1111
#include <linux/module.h>
@@ -160,6 +160,13 @@ fetch_store_string(unsigned long addr, void *dest, void *base)
160160
if (ret >= 0) {
161161
if (ret == maxlen)
162162
dst[ret - 1] = '\0';
163+
else
164+
/*
165+
* Include the terminating null byte. In this case it
166+
* was copied by strncpy_from_user but not accounted
167+
* for in ret.
168+
*/
169+
ret++;
163170
*(u32 *)dest = make_data_loc(ret, (void *)dst - base);
164171
}
165172

0 commit comments

Comments
 (0)