Thread (56 messages) 56 messages, 3 authors, 2026-09-11

Re: [PATCH v9 32/39] dyndbg: split multi-query strings with @

flat view

From: sashiko-bot@kernel.org
Date: 2026-09-09 01:06:30
Also in: dri-devel

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 [off-list ref]

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.
quoted hunk ↗ jump to hunk
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
[ ... ]
quoted hunk ↗ jump to hunk
@@ -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/20260908-dd-cmap-part2-clean-v9-0-3a3f621f4a10@gmail.com?part=32
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help