[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220819215700.549b4dac@gandalf.local.home>
Date: Fri, 19 Aug 2022 21:57:00 -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>,
Masami Hiramatsu <mhiramat@...nel.org>,
Tzvetomir Stoyanov <tz.stoyanov@...il.com>,
Tom Zanussi <zanussi@...nel.org>, stable@...r.kernel.org
Subject: Re: [PATCH 2/4] tracing/eprobes: Do not hardcode $comm as a string
On Fri, 19 Aug 2022 21:40:37 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> +++ b/kernel/trace/trace_probe.c
> @@ -622,9 +622,10 @@ static int traceprobe_parse_probe_arg_body(const char *argv, ssize_t *size,
>
> /*
> * Since $comm and immediate string can not be dereferenced,
> - * we can find those by strcmp.
> + * we can find those by strcmp. But ignore for eprobes.
> */
> - if (strcmp(arg, "$comm") == 0 || strncmp(arg, "\\\"", 2) == 0) {
> + if (!(flags & TPARG_FL_TPOINT) &&
> + strcmp(arg, "$comm") == 0 || strncmp(arg, "\\\"", 2) == 0) {
And my tests fail shortly after I send this. It complains about a new
warning. The above needs parenthesis around it.
Will send a v2 after my tests pass, in case it finds something else I
missed.
-- Steve
> /* The type of $comm must be "string", and not an array. */
> if (parg->count || (t && strcmp(t, "string")))
> goto out;
> --
Powered by blists - more mailing lists