Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1167065rdb; Fri, 22 Dec 2023 18:06:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSLzU2XSq/ECt0SOLANVWWtD6/ep5HwwXV7x0ptnBkTwbXKRWw1cd+yyMdqyBRDFdQBd/b X-Received: by 2002:a50:8a96:0:b0:54c:4837:9a9f with SMTP id j22-20020a508a96000000b0054c48379a9fmr1279710edj.70.1703297173454; Fri, 22 Dec 2023 18:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703297173; cv=none; d=google.com; s=arc-20160816; b=tutjmqkc5hr/j56nYROdcxIm8+akTLY6Tvzg0khA9ZlGSRp9czNbF17hRxI2kblIx8 BDRZIXxjDFj/PSdGkXrJqyANQVKSn86wLsa9Xqt9l2StNA059nJjR6eCuw3ckUwUFr09 kdPj+myjTvCVADVGHycs4Dp1ax2Jn3HtqnZp5r8PLsAxxaSyMG9Bp65j2EnDyiQotOiJ b8y2qxfg/k8msdEba77cyiwEKJoIFD54hfdKRh0N5Syp7mYECSj8wefr6bK8Qxd9sFDP NTyZqvEIKMOYQqPGXhObaRdxCk0uiZaTchbLA50JN1vI/eSLkRYYKoVyzhZ5c4Y7QDHV 2Czg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hjBb7btKJ5cDmDK0xMvEJpKljQMf3aQ5ihb+cugdsR0=; fh=pC62+Xzu9rWxP3EwkFQHy3M37dHcdVo9RRC56IjE3s4=; b=KIWy+GXgCcRVnRmQNclU/fP/xXXAuW/4Qs6N832dA41KZAxS4d3x9m/fUWKrSFCHvx BrSEAsisSHa5UrIpjwnzjg08MLr486o7BlJvDtvXVg4a0CkTD2VaGknK0Ca3NN0YF7sd YL9H94zmNAOKZ9+k+2fZ/BdiKlfhHYOUUxm0CFcTlHrX/GomZu2Y6KTnF+G2+hO8O9y3 Zf6zfkbR2g3TalbMnT0oUD1j1fiRnhSBvo8mytOg7bEotdskyb2UvhhqSyZmERBkZqTH S8OeIMtL3lkgttyVByX/JDhrakye+BWaMbhrWbNxrvxp/9sDaSK+KLmfiD23dW6EC0MC ADUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=uUz84Kqp; spf=pass (google.com: domain of linux-kernel+bounces-10180-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=semihalf.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o24-20020a509b18000000b0055251261802si2383540edi.403.2023.12.22.18.06.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 18:06:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10180-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@semihalf.com header.s=google header.b=uUz84Kqp; spf=pass (google.com: domain of linux-kernel+bounces-10180-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=semihalf.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 60D371F2382A for ; Sat, 23 Dec 2023 01:57:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B15928695; Sat, 23 Dec 2023 01:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=semihalf.com header.i=@semihalf.com header.b="uUz84Kqp" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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 B9F9A26AD2 for ; Sat, 23 Dec 2023 01:52:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=semihalf.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=semihalf.com Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5542ac8b982so2217834a12.3 for ; Fri, 22 Dec 2023 17:52:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; t=1703296343; x=1703901143; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hjBb7btKJ5cDmDK0xMvEJpKljQMf3aQ5ihb+cugdsR0=; b=uUz84KqpQZpD3ynrwdSyysa7U9xdq99VCXqH0o+HAmoowd9p/PMDOBuFiEd/3ToR9w xEafMjPLGEdM/s7sRD9GWc3n0ogshKX02RGHyXRpZVOfhpgU1zaeIIDxPs+ADI+SgCZH lIlOZX+FJDqU/DzXKqiNLgLO3qYmCyy+QecARAPHaXHPKyYC/LPir6D0X7wmVS4OpoOc 1vUxq5sWeXBF96x+LXX/7LoSk0UrSL2vqRAdhHhtqCNODZkHfCkQEBnE/TvIbiqNLYIz KFYu9oCujW1+kvNqYvMcN8qV2Y7UVOOc5/xTVVxkfiqhFRq7ajgSCoS1NharArX6bJCD 47Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703296343; x=1703901143; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hjBb7btKJ5cDmDK0xMvEJpKljQMf3aQ5ihb+cugdsR0=; b=A5gD4LWnz0aqCSfx3zcXsbtQfhd3GVEDF2dG/eVBlPtPtX24W0XebMjKnm9ACFHC2e CcvCuxmc9RkbKydVXfqQ8R0eYuYR7QKAYQOwaCFyJKBGsNosW8L3Nu1F58faJUvZP4Ab UP8RGmDkBz2X6pRtfUsnu9joDaUZe8n9lfwWcEKwegt8X6NgZW61dic8YIQ4sl52sVNw N9u7UC+iavxB1SGl1UWgcM+zItbkz+qJROuKzw2lMtSrrBi0Oo8jlyaONfWJZ8kCEiTh fOq92mj2ow6fPmoDlUCjQUfgUjAm0RyGa9NG8u29qcOb3pD8m2EOQIL8hHOcYJcvq+Zu 3bwQ== X-Gm-Message-State: AOJu0YzZ0gafWXU6dZGjvXlHFcnVbSrKGicSODgPFWfe916jKf6hiiTH Ml7j6mg2GSWTaiLFjC+y/wYkKpTzyFfc X-Received: by 2002:a50:9b14:0:b0:553:8227:178c with SMTP id o20-20020a509b14000000b005538227178cmr1178108edi.68.1703296343184; Fri, 22 Dec 2023 17:52:23 -0800 (PST) Received: from ukaszb-l.semihalf.net (alfa56.extreme-net.one.pl. [213.77.89.56]) by smtp.gmail.com with ESMTPSA id h2-20020a0564020e8200b005532a337d51sm3288494eda.44.2023.12.22.17.52.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 17:52:22 -0800 (PST) From: =?UTF-8?q?=C5=81ukasz=20Bartosik?= To: Jason Baron , Jim Cromie , Andrew Morton , Kees Cook , Douglas Anderson Cc: Guenter Roeck , Yaniv Tzoreff , Benson Leung , Steven Rostedt , Vincent Whitchurch , Pekka Paalanen , Sean Paul , Daniel Vetter , Simon Ser , John Ogness , Petr Mladek , Sergey Senozhatsky , linux-kernel@vger.kernel.org, upstream@semihalf.com Subject: [PATCH v3 20/22] dyndbg: split multi-query strings with % Date: Sat, 23 Dec 2023 02:51:29 +0100 Message-ID: <20231223015131.2836090-21-lb@semihalf.com> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20231223015131.2836090-1-lb@semihalf.com> References: <20231223015131.2836090-1-lb@semihalf.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jim Cromie Multi-query strings have long allowed: modprobe drm dyndbg="class DRM_UT_CORE +p; class DRM_UT_KMS +p" modprobe drm dyndbg=< on module: <*> [ 38.172011] dyndbg: bad flag-op f, at start of format [ 38.172487] dyndbg: flags parse failed [ 38.172839] dyndbg: query 1: on module: <*> [ 38.173285] dyndbg: expecting pairs of match-spec [ 38.173791] dyndbg: query parse failed [ 38.174141] dyndbg: processed 2 queries, with 0 matches, 2 errs bash: echo: write error: Invalid argument In trade for that minor format selection limitation, we get to do: vng -v --user root -p 4 \ -a dynamic_debug.verbose=3 \ -a drm.debug=0x15 \ -a i915.dyndbg=class,DRM_UT_CORE,+pfmlt_%class,DRM_UT_KMS,+pfml modprobe drm modprobe i915 NOTES/TLDR: In this example, using both drm.debug & drm.dyndbg is mostly for testing. Using drm.debug is preferred, because the drivers all explicitly depend on that input/control-point, so settings there are propagated to drivers. But more to the point, drm.dyndbg explicitly limits the query to drm. In fact, you could pass a module wildcard in the above, and achieve the same thing: vng -v --user root -p 4 \ -a dynamic_debug.verbose=3 \ -a \*.dyndbg=class,DRM_UT_CORE,+pfmlt_%class,DRM_UT_KMS,+pfm%class, \ DRM_UT_ATOMIC,+pf ':' would be a more natural multi-cmd separator, but is reserved for +T: to designate separate tracebuf instances. If '%' is distasteful, the backup plan is ",_,", since that would never appear in a useful cmd. Signed-off-by: Jim Cromie --- 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 48ce24c39457..453eab7092dc 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -963,7 +963,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"); if (split) *split++ = '\0'; -- 2.43.0.472.g3155946c3a-goog