Re: [PATCH v4 06/15] tracing/filters: Fix quoted operand parsing in function event filter

From: Steven Rostedt

Date: Tue Nov 17 2026 - 19:14:31 EST


On Thu, 29 Oct 2026 10:38:21 +0900
"Masami Hiramatsu (Google)" <mhiramat@xxxxxxxxxx> wrote:

> From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> In parse_pred(), when parsing a quoted operand for function events (e.g.
> ip == "schedule"):
> 1. The loop 'for (i++; str[i]; i++)' breaks when str[i] matches the
> closing quote, but 'i' is never incremented past the closing quote.
> As a result, parse_pred() returns 'i' pointing at the closing quote,
> causing the caller predicate_parse() to immediately re-parse the
> closing quote as the start of the next token and fail with
> FILT_ERR_TOO_MANY_PREDS.
> 2. If the closing quote is missing (e.g. ip == "schedule), the loop stops
> at the NUL terminator without reporting an error.
> 3. The loop started with 'i++', which was intended to skip the opening
> quote, but also unconditionally skipped the first character of unquoted
> function operands.

Can you show actual examples of setting filters that fail with the above
issues. Something I can test and see that what was fixed, and that it was
indeed fixed.

Thanks,

-- Steve