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 of function arguments -----BEGIN PGP SIGNATURE----- iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCXFsNwBQccm9zdGVkdEBn b29kbWlzLm9yZwAKCRAp5XQQmuv6qlSLAP9iup0t8BrDYcJQCNIJK+7hwBdB642c 11qbWE7aXfsyUwEAu78tJfQfmBeZz7mHxKeMkTHQHE2IqV5qU311twOFiAE= =zkXr -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
4879f11615
|
@ -5,7 +5,7 @@
|
||||||
* Copyright (C) IBM Corporation, 2010-2012
|
* Copyright (C) IBM Corporation, 2010-2012
|
||||||
* Author: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
|
* Author: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
|
||||||
*/
|
*/
|
||||||
#define pr_fmt(fmt) "trace_kprobe: " fmt
|
#define pr_fmt(fmt) "trace_uprobe: " fmt
|
||||||
|
|
||||||
#include <linux/ctype.h>
|
#include <linux/ctype.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
@ -160,6 +160,13 @@ fetch_store_string(unsigned long addr, void *dest, void *base)
|
||||||
if (ret >= 0) {
|
if (ret >= 0) {
|
||||||
if (ret == maxlen)
|
if (ret == maxlen)
|
||||||
dst[ret - 1] = '\0';
|
dst[ret - 1] = '\0';
|
||||||
|
else
|
||||||
|
/*
|
||||||
|
* Include the terminating null byte. In this case it
|
||||||
|
* was copied by strncpy_from_user but not accounted
|
||||||
|
* for in ret.
|
||||||
|
*/
|
||||||
|
ret++;
|
||||||
*(u32 *)dest = make_data_loc(ret, (void *)dst - base);
|
*(u32 *)dest = make_data_loc(ret, (void *)dst - base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue