Received: by 2002:a05:7412:8d06:b0:f9:332d:97f1 with SMTP id bj6csp48193rdb; Mon, 18 Dec 2023 08:34:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlvENOCWoSpjwzq/KWkk+LOVa7Afsdxyxi65IW1wumdE2RTY4g6GKZU2eNoIxHR07+hYGh X-Received: by 2002:a05:6a20:8410:b0:18f:97c:4f5e with SMTP id c16-20020a056a20841000b0018f097c4f5emr9234275pzd.106.1702917267190; Mon, 18 Dec 2023 08:34:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702917267; cv=none; d=google.com; s=arc-20160816; b=JS6yAnFdZwiBKvMLlE+Al7GWWjoczathFh2R0bfJNrOkvRIRF+iiUV6cOqE1ICNfZi iiAtU132HM50lv4Jo02E8uZKlXmJnTwi6bGOwpBWCBB5PN79H1LaxnJrqWZUmy4Gipi0 hBvdIuOfqsS5f3yo4CInklhNVboPMznqtDXH+hegtcKpvGjM6FJ5S+3JzgJmH8NRrLQ+ mQ2tz/7UgNGEfjbSrYgMcqZrDk0K5LbgroKOcMWd5jP5vdtrImspWQEIgo71gVuT0e7/ 7SRcx5kAz/lgNA/sg+K7jmA4KOponXznuCtjTMUuj24fG6m5ozPDOUffEhiFJ/j+FZkU VQ/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/rOppEuE9fe8jK025Yd36IdkiDsieSocMieD2PWZmg8=; fh=A8KIicOkr7NTCg0vcuGCpgkN+RBuR0QjFFKloq6Onyw=; b=AqrA7560Ldt7y7883TyagIjU6SzTz0cJ4rg/jPZ5IfCwvnd98IP85vbB9gYuUr5A4R okro6hVRggluh92m7ZdJ+q1tr1VcxHEXcYvUlc9I+y9BiIj7BD/pgZtdyMKTCcs5Du/E DY0OfniXqmu5Bba/lkCsI31qNQtDDwDtD0zuLRNbHnTbFs7siempvpYhXk55ZLJoElzJ NfnPz7vuFSNrdeq0t4zMRFc15X2vFR6Lm5uPJNHAakOeWMRNXFna/iC7QF2DS5V+z8Fu r4vShznNzzTR+BSh4q/gM6ckHZ0D7CVlQP4p1cLzDtpoaPUckdhTkHxwP8nUF/viN3aC PXlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=gBNGgbyo; spf=pass (google.com: domain of linux-kernel+bounces-4069-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4069-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s19-20020a056a0008d300b006d09bca867fsi12745322pfu.121.2023.12.18.08.34.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:34:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4069-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=gBNGgbyo; spf=pass (google.com: domain of linux-kernel+bounces-4069-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4069-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 248122845A6 for ; Mon, 18 Dec 2023 16:34:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 674F56FB6; Mon, 18 Dec 2023 16:34:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="gBNGgbyo" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B051498BC for ; Mon, 18 Dec 2023 16:34:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-40c339d2b88so36876805e9.3 for ; Mon, 18 Dec 2023 08:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1702917254; x=1703522054; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/rOppEuE9fe8jK025Yd36IdkiDsieSocMieD2PWZmg8=; b=gBNGgbyoUVijHfkMRibg3eWKqGWsqzlwR99xEr8v1/i07O0NW9XMK+CdWUzLAFBeDk 3RaxsPpsX8Kj5cY52QVXjP2pCDzT4f3L5WxYoYSROoi/lVNcg6ym9WemLY12XYAA3Hb4 L4fknAj2sifpanUvHjqzBfIxvegqKLF4NmpIJnOegcsIYRa7U75B5xgOIpgHZxyasQLE WbxrTkw+UaIJXN1EKKwmXCi+tGL4cVe96JGvdqEw+a09DT5v4S4q4zRPERhCOraFwDOn i4RN9iMULFBUlEJDpM2LnTHCHu1k+zMS1Dx0UUdpucsFGr2vc55EvAPDqHTc8ATD1aQ4 81Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702917254; x=1703522054; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/rOppEuE9fe8jK025Yd36IdkiDsieSocMieD2PWZmg8=; b=I/iIBKZPDBJr5NjYe6NUt4IYI4eHwYfTl/0NNjjjcTXxCnHb2n8hRoGnw5yyd0oKra 5jtYZ/Stc0c9HLQHvcWPVfj3z/6EkiIqb5NNDWeyXIiDqJZlo+/skmNYUqBFylDJcttG D9iiGxGyWSlf1mA7nfQXQux68xWzs6IiJ4XAfHDiLxeHAJ9NfY6+vXR2m46D/OTbCIR2 Tu/K1cHuTcFWH0lfrmGAV1+M4MQvhWDGyF1tfi4zHIgseyvWT5e/mjoUCy5+ZCVIL5Sy Ht8swBHeE7jhh9maDlD7SZA+BG42TyuImAZLuTuExjvGpQ6zD0MKP7aDuKIO7nGKQw4n p7hA== X-Gm-Message-State: AOJu0YzDAC1EDk4R+knUdYw87xboiXreZCVRakgsKI1SplmoCPanWmSt 84VzEYtIhVHwQPsB6gs/aC+IYw== X-Received: by 2002:a05:600c:54c1:b0:40b:5e21:e263 with SMTP id iw1-20020a05600c54c100b0040b5e21e263mr8508945wmb.80.1702917254225; Mon, 18 Dec 2023 08:34:14 -0800 (PST) Received: from alley ([176.114.240.50]) by smtp.gmail.com with ESMTPSA id ts7-20020a170907c5c700b00a1b65cd1957sm14343131ejc.107.2023.12.18.08.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:34:13 -0800 (PST) Date: Mon, 18 Dec 2023 17:34:11 +0100 From: Petr Mladek To: Jim Cromie Cc: lb@semihalf.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, bleung@google.com, contact@emersion.fr, daniel@ffwll.ch, dianders@chromium.org, groeck@google.com, jbaron@akamai.com, john.ogness@linutronix.de, keescook@chromium.org, ppaalanen@gmail.com, rostedt@goodmis.org, seanpaul@chromium.org, sergey.senozhatsky@gmail.com, upstream@semihalf.com, vincent.whitchurch@axis.com, yanivt@google.com, gregkh@linuxfoundation.org Subject: Re: [re: PATCH v2 00/15 - 03/11] dyndbg: disambiguate quoting in a debug msg Message-ID: References: <674f65e71c5c3e874b6b72b6f9d8cdd7a091b6d0.1701993656.git.jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <674f65e71c5c3e874b6b72b6f9d8cdd7a091b6d0.1701993656.git.jim.cromie@gmail.com> On Thu 2023-12-07 17:15:06, Jim Cromie wrote: > 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: on module: <*> Could you provide a real life example, please? It is hard to imagine what '"foo" format' means in a real life. Also could you please provide output before and after? Honestly, Using <> as quotes looks pretty non-standard and confusing to me. Also this changes only one place but '\"' is used in many other locations which would make dyndbg messages even more confusing. I do not understand how this would help. The double quote is gone even in this variant. BTW: It is a bit funny that this patch is supposed to make the debug message better readable. For me, the echo command is hard to read in the first place. I would use: lx]# echo "module $my_module ,_ -f" > /proc/dynamic_debug/control Maybe, this change fixes the output to match some personal style. I wonder how common is the style. I can't remember seeing: $> echo param param param Instead I frequently see: $> echo "bla bla bla". Best Regards, Petr