Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Adding '@' as a naive multi-query delimiter unconditionally breaks dynamic debug queries for format strings or file paths containing '@'. --
commit 14701392fec803b263b7d4600e1eddc32de76b94 Author: Jim Cromie <[email protected]> dyndbg: split multi-query strings with @ This patch adds '@' to the existing ';' and '\n' multi-command separators for dynamic debug. This is intended to be more shell-friendly and avoid quoting and escaping hassles when passing commands. > diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c > index d28858acdc8f9..e6f5a524d63b6 100644 > --- a/lib/dynamic_debug.c > +++ b/lib/dynamic_debug.c [ ... ] > @@ -631,7 +631,7 @@ static int ddebug_exec_queries(char *query, const char > *modname) > int i, errs = 0, exitcode = 0, rc, nfound = 0; > > for (i = 0; query; query = split) { > - split = strpbrk(query, ";\n"); > + split = strpbrk(query, "@;\n"); [Severity: High] Does this unconditionally split queries on '@' before they undergo quote-aware tokenization in ddebug_tokenize()? If a user tries to filter debug prints using a format string or file path that legitimately contains an '@' character, such as matching a device tree node like: format "node@1234", it appears this will destructively split the string. Since there is no escaping mechanism in strpbrk(), could this introduce a regression for existing valid queries containing hardware addresses or device tree nodes? > if (split) > *split++ = '\0'; > -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=32
