lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <674f65e71c5c3e874b6b72b6f9d8cdd7a091b6d0.1701993656.git.jim.cromie@gmail.com>
Date:   Thu,  7 Dec 2023 17:15:06 -0700
From:   Jim Cromie <jim.cromie@...il.com>
To:     lb@...ihalf.com, linux-kernel@...r.kernel.org
Cc:     akpm@...ux-foundation.org, bleung@...gle.com, contact@...rsion.fr,
        daniel@...ll.ch, dianders@...omium.org, groeck@...gle.com,
        jbaron@...mai.com, jim.cromie@...il.com, john.ogness@...utronix.de,
        keescook@...omium.org, pmladek@...e.com, ppaalanen@...il.com,
        rostedt@...dmis.org, seanpaul@...omium.org,
        sergey.senozhatsky@...il.com, upstream@...ihalf.com,
        vincent.whitchurch@...s.com, yanivt@...gle.com,
        gregkh@...uxfoundation.org
Subject: [re: PATCH v2 00/15 -  03/11] dyndbg: disambiguate quoting in a debug msg

When debugging a query parsing error, the debug message wraps the
query in escaped-double-quotes.  This is confusing when mixed with any
quoted args where quotes are stripped by the shell.

So this replaces the \"%s\" with <%s> in the format string, allowing a
user to see how the shell strips quotes:

lx]# echo  module "foo" format ,_ -f > /proc/dynamic_debug/control
[  716.037430] dyndbg: read 26 bytes from userspace
[  716.037966] dyndbg: query 0: <module foo format ,_ -f> on module: <*>

Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
 lib/dynamic_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index fc94f09b20db..bde96ad867c6 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -955,7 +955,7 @@ static int ddebug_exec_queries(char *query, const char *modname)
 		if (!query || !*query || *query == '#')
 			continue;
 
-		vpr_info("query %d: \"%s\" mod:%s\n", i, query, modname ?: "*");
+		vpr_info("query %d: <%s> on module: <%s>\n", i, query, modname ?: "*");
 
 		rc = ddebug_exec_query(query, modname);
 		if (rc < 0) {
-- 
2.43.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ