Skip to content

Commit

Permalink
tracing/kprobe: Cast user-space address correctly
Browse files Browse the repository at this point in the history
Cast user-space address correctly to pass to probe_user_read().

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Masami Hiramatsu authored and Steven Rostedt (VMware) committed May 26, 2019
1 parent 87a9095 commit 539b75b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/trace/trace_kprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 539b75b

Please sign in to comment.