[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190608173113.5fc866bf@oasis.local.home>
Date: Sat, 8 Jun 2019 17:31:13 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Masami Hiramatsu <mhiramat@...nel.org>,
Andreas Ziegler <andreas.ziegler@....de>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH AUTOSEL 5.1 058/186] tracing: probeevent: Fix to make
the type of $comm string
On Sat, 1 Jun 2019 09:14:34 -0400
Sasha Levin <sashal@...nel.org> wrote:
> From: Masami Hiramatsu <mhiramat@...nel.org>
>
> [ Upstream commit 3dd1f7f24f8ceec00bbbc364c2ac3c893f0fdc4c ]
>
> Fix to make the type of $comm "string". If we set the other type to $comm
> argument, it shows meaningless value or wrong data. Currently probe events
> allow us to set string array type (e.g. ":string[2]"), or other digit types
> like x8 on $comm. But since clearly $comm is just a string data, it should
> not be fetched by other types including array.
>
> Link: http://lkml.kernel.org/r/155723736241.9149.14582064184468574539.stgit@devnote2
>
> Cc: Andreas Ziegler <andreas.ziegler@....de>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: stable@...r.kernel.org
> Fixes: 533059281ee5 ("tracing: probeevent: Introduce new argument fetching code")
I thought the "AUTOSEL" patches are to find patches that are not marked
for stable and pull them in. It would be good to differentiate those in
the subject. As I'm more inclined to audit automatically pulled in ones,
because those are more likely to be incorrectly backported.
-- Steve
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
> kernel/trace/trace_probe.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
> index 8f8411e7835fd..e41d389b7f491 100644
> --- a/kernel/trace/trace_probe.c
> +++ b/kernel/trace/trace_probe.c
> @@ -420,13 +420,14 @@ static int traceprobe_parse_probe_arg_body(char *arg, ssize_t *size,
> return -E2BIG;
> }
> }
> - /*
> - * The default type of $comm should be "string", and it can't be
> - * dereferenced.
> - */
> - if (!t && strcmp(arg, "$comm") == 0)
> +
> + /* Since $comm can not be dereferred, we can find $comm by strcmp */
> + if (strcmp(arg, "$comm") == 0) {
> + /* The type of $comm must be "string", and not an array. */
> + if (parg->count || (t && strcmp(t, "string")))
> + return -EINVAL;
> parg->type = find_fetch_type("string");
> - else
> + } else
> parg->type = find_fetch_type(t);
> if (!parg->type) {
> pr_info("Unsupported type: %s\n", t);
Powered by blists - more mailing lists