Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp2193840rwb; Fri, 5 Aug 2022 15:24:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR63DgAjkUqupf5lPjtsgN7enJohC2kYH9g7taOxFls+F5p/pFdTdHJba/tfPPKZfuwZleNU X-Received: by 2002:a17:907:60c7:b0:731:148b:c515 with SMTP id hv7-20020a17090760c700b00731148bc515mr1644253ejc.724.1659738274123; Fri, 05 Aug 2022 15:24:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659738274; cv=none; d=google.com; s=arc-20160816; b=EyObo61+YAanowJXDDPKd3mZ9Urzy4DLc5PMaIEl+G+gin1CyO9AL3nx5G1sToiCd0 YCByKbTmQ3ZA8NrN/pld25FPhjNXRCjKEHHHXO2drUnmHL1mYeUMF/XQ1tui8Ouax8eD wECaypXedTE7kHwLJwDEnJR/giMKZpC8FRH7HX3Jl/nP5d9w3C1LGoNqK580OiZ8bwFN dig88iKmWaMYrFgCTaJ/KjtNN2rrwSUGYYdxqFfTw+QXfqSnhF+VCT7HqZEM5GGp5txz vZUN0rTj9FcbahVWhn2ulhMW+923sfTUot/vk+A2nHQRWwkxICy1jDz3lZdKrfodlmjU Kvdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dW/qowRKwpSX+eB9zQgpcFjLzbW7/9zpGPg2Go1FHeI=; b=LXy7IP76sH6hOLqQWzS0RHRn7zVcyhFy8OAF/4eTXIu98+Y32/VCXL4U4bm3viDXMe ODjkYw2JQ7FmUSgeJLiE1FH4XLt8k8ApTfR73AVFKaauB51epyVT9aV12ekabsdu+7Zq tM59bxjG+u3J3wwq36BRRx1Ismi21j8NfSHEMKA22itWxtUk0hhWfvrttD1b6CFY9Hbt CYj5tObicKb4JcbjJYHKfN3hi0RMsT0rXsn2XksBKHQlYRvhSFIP9uJcdbxp/8UISDbJ lf5Z3xOF5svTDtZbzyBH9kZqr16hcr2V5QkuYABg6/+v6BIpMfD3ue+FiQjwwngflrdJ L6cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pQqact85; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a056402355400b0043c2e89d0acsi935144edd.3.2022.08.05.15.24.08; Fri, 05 Aug 2022 15:24:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pQqact85; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241562AbiHEVyZ (ORCPT + 99 others); Fri, 5 Aug 2022 17:54:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241542AbiHEVyV (ORCPT ); Fri, 5 Aug 2022 17:54:21 -0400 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EE9FE0D4; Fri, 5 Aug 2022 14:54:15 -0700 (PDT) Received: by mail-io1-xd35.google.com with SMTP id e69so2855970iof.5; Fri, 05 Aug 2022 14:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=dW/qowRKwpSX+eB9zQgpcFjLzbW7/9zpGPg2Go1FHeI=; b=pQqact85NoRb+xtdb4neqHJ2MSf9lwR+gCDz0zUVVjYSEELKbLwImAE6CSqgl+Q4XM /dOHKlBwUpeC9a8Kj6oBimwhLi3DHsK4O7zQm0pwLrcX3ZopEjW6HZIbh6YyUFVaafZr 5szL5MQBQwSMH6R3xf437A6KKteGEzAGGiy7gbo8AlKfmlJRbUz1IBy9CwCiAbuPknfT e4D/JLSz4pesGI29pQZJh6dO5qlsWwfDg/FTM/7hrS1PjqPn4Ghoe084pBnGzOmJ/PYX 0xmtTY4hBf2zQIPotw1GI23q+epE7LZx9a7RP/txZjlmC6Ra0OXTYFDlot7BqDZmDYEk VVxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=dW/qowRKwpSX+eB9zQgpcFjLzbW7/9zpGPg2Go1FHeI=; b=6wpuIIU7p1h9wI3qdptFuf+g7dfZmKDiPt2UrPzD47mcsdyCTIWRBTub6IjLzfXJPO v6EEDSikl4A8jcMMJ77Ra65GndIoqQynKjQaLwB5xEv5LRwepPrTOZYvbTkZu2g7sJ7j frX4J9vjcA9xjWVumhQIyZVZw6NsQcaW81EiL9HRHec69AlXa3wApU+zC7oFutTXbBb3 k4RXqcS2sBdWwkIlct97c5zwZrsyQKCFZj8Gu+P3unG4mRw/vwQWGIaaHLXQ3FZ2i7VA WV5QtKcrAYnTBHqvoK5WydojHsDWSeQfHjCR7hZaNJMB9O8Z2UDiwR4kZv0IyTAo42/o iJLQ== X-Gm-Message-State: ACgBeo1qj6pOyKr0KJ0ebqQX4Cj7k4A27oKPD3u2jXHVVrWjAwNVP/F7 Ne4wm/EuhI2gV/ZYYX1g8t64VXEULR01hw== X-Received: by 2002:a05:6638:3792:b0:342:b241:13c2 with SMTP id w18-20020a056638379200b00342b24113c2mr3231037jal.257.1659736454304; Fri, 05 Aug 2022 14:54:14 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id e12-20020a056602044c00b0067c09fd0b53sm1765532iov.21.2022.08.05.14.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Aug 2022 14:54:13 -0700 (PDT) From: Jim Cromie To: linux-kernel@vger.kernel.org, jbaron@akamai.com, gregkh@linuxfoundation.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Cc: daniel.vetter@ffwll.ch, seanpaul@chromium.org, robdclark@gmail.com, Jim Cromie , Rasmus Villemoes Subject: [PATCH v5 02/33] dyndbg: fix module.dyndbg handling Date: Fri, 5 Aug 2022 15:53:24 -0600 Message-Id: <20220805215355.3509287-3-jim.cromie@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220805215355.3509287-1-jim.cromie@gmail.com> References: <20220805215355.3509287-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For CONFIG_DYNAMIC_DEBUG=N, the ddebug_dyndbg_module_param_cb() stub-fn is too permissive: bash-5.1# modprobe drm JUNKdyndbg bash-5.1# modprobe drm dyndbgJUNK [ 42.933220] dyndbg param is supported only in CONFIG_DYNAMIC_DEBUG builds [ 42.937484] ACPI: bus type drm_connector registered This caused no ill effects, because unknown parameters are either ignored by default with an "unknown parameter" warning, or ignored because dyndbg allows its no-effect use on non-dyndbg builds. But since the code has an explicit feedback message, it should be issued accurately. Fix with strcmp for exact param-name match. Reported-by: Rasmus Villemoes Fixes: b48420c1d301 dynamic_debug: make dynamic-debug work for module initialization Signed-off-by: Jim Cromie Acked-by: Jason Baron --- include/linux/dynamic_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index dce631e678dd..f30b01aa9fa4 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -201,7 +201,7 @@ static inline int ddebug_remove_module(const char *mod) static inline int ddebug_dyndbg_module_param_cb(char *param, char *val, const char *modname) { - if (strstr(param, "dyndbg")) { + if (!strcmp(param, "dyndbg")) { /* avoid pr_warn(), which wants pr_fmt() fully defined */ printk(KERN_WARNING "dyndbg param is supported only in " "CONFIG_DYNAMIC_DEBUG builds\n"); -- 2.37.1