Re: [PATCH v3 4/5] tracing/probe: Add ustring type for user-space string

From: Steven Rostedt
Date: Wed Feb 27 2019 - 21:20:53 EST


On Wed, 27 Feb 2019 23:44:13 +0900
Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:

> Add "ustring" type for fetching user-space string from kprobe event.
> User can specify ustring type at uprobe event, and it is same as
> "string" for uprobe.
>
> Note that probe-event provides this option but it doesn't choose the
> correct type automatically since we have not way to decide the address
> is in user-space or not on some arch (and on some other arch, you can
> fetch the string by "string" type). So user must carefully check the
> target code (e.g. if you see __user on the target variable) and
> use this new type.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
> ---
> Changes in v2:
> - Use strnlen_user() instead of open code for fetch_store_strlen_user().


Acked-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>

-- Steve