[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190526191848.121312660@goodmis.org>
Date: Sun, 26 May 2019 15:18:39 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
kbuild test robot <lkp@...el.com>,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: [for-next][PATCH 11/16] tracing/kprobe: Cast user-space address correctly
From: Masami Hiramatsu <mhiramat@...nel.org>
Cast user-space address correctly to pass to probe_user_read().
Reported-by: kbuild test robot <lkp@...el.com>
Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
---
kernel/trace/trace_kprobe.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index ff14eb011c1c..2c5357dddb92 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -955,7 +955,9 @@ probe_mem_read(void *dest, void *src, size_t size)
static nokprobe_inline int
probe_mem_read_user(void *dest, void *src, size_t size)
{
- return probe_user_read(dest, src, size);
+ const void __user *uaddr = (__force const void __user *)src;
+
+ return probe_user_read(dest, uaddr, size);
}
/* Note that we don't verify it, since the code does not come from user space */
--
2.20.1
Powered by blists - more mailing lists