diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-02-07 02:59:01 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-02-07 02:59:01 -0500 |
| commit | 4879f11615d29d7b91cd5a4cfbff8e563ada991d (patch) | |
| tree | 5eedc6421bb041bb24309f522b369a9139f5fb6d | |
| parent | 076a3f553743cca32ff261d4bea29a4e92d936dd (diff) | |
| parent | 0722069a5374b904ec1a67f91249f90e1cfae259 (diff) | |
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
| -rw-r--r-- | kernel/trace/trace_uprobe.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index e335576b9411..9bde07c06362 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * Copyright (C) IBM Corporation, 2010-2012 | 5 | * Copyright (C) IBM Corporation, 2010-2012 |
| 6 | * Author: Srikar Dronamraju <srikar@linux.vnet.ibm.com> | 6 | * Author: Srikar Dronamraju <srikar@linux.vnet.ibm.com> |
| 7 | */ | 7 | */ |
| 8 | #define pr_fmt(fmt) "trace_kprobe: " fmt | 8 | #define pr_fmt(fmt) "trace_uprobe: " fmt |
| 9 | 9 | ||
| 10 | #include <linux/ctype.h> | 10 | #include <linux/ctype.h> |
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| @@ -160,6 +160,13 @@ fetch_store_string(unsigned long addr, void *dest, void *base) | |||
| 160 | if (ret >= 0) { | 160 | if (ret >= 0) { |
| 161 | if (ret == maxlen) | 161 | if (ret == maxlen) |
| 162 | dst[ret - 1] = '\0'; | 162 | 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++; | ||
| 163 | *(u32 *)dest = make_data_loc(ret, (void *)dst - base); | 170 | *(u32 *)dest = make_data_loc(ret, (void *)dst - base); |
| 164 | } | 171 | } |
| 165 | 172 | ||
