Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp871366rwb; Thu, 11 Aug 2022 11:21:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR66GjMW5pQweU3F11oadLaZOtOxhn0PV8xM834tsTTyp/kLMmD9OBfsz4a59r7Z5yjPz0lw X-Received: by 2002:a17:907:94d2:b0:730:87c1:e86c with SMTP id dn18-20020a17090794d200b0073087c1e86cmr206909ejc.129.1660242085117; Thu, 11 Aug 2022 11:21:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660242085; cv=none; d=google.com; s=arc-20160816; b=KwaugF3joihCDLRxP4voGxMRmQbsn8fZRJnK0VpxvzTtePzupRZ9/buM7IGRTu+B+S SVvZxm2QPaqRcF0sZ0dYiN7EcjYf79nx6uFjn8wg6n1cKuYZHqGt0e6ladc6242Dz9pR J2bYDiVEGKziF07d2BgryDJp2sJEn4XTQbTX19EEgk79zvTXn+hInYuhjvaI27XHv03O m+UgE28rfD1ULPtAMWsTyEScq5J9HJMHqQGPG1/EyxErUhhNiMcBL6hP0xxDG5vvv7S1 rEGvPhXoPdBg9IkafVZqHBKk9+EWBnUI2UECxuGM9Bbf494uRVSidWkbsPg6PMqnV9Ra IvnA== 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=uYfe9GJTfqKYnItcqulx8kmPwbv+xN+mN1dD4b+9rZc1E1eZ4dP/EDmg9J2XxljX1l atEeaXdbf5bTOmybCa1Qyt0GZwh6xQGVh3Z9hHWzEAq+wj569G10FEKFRVmRSz9k+BkH HNn8wVXUAMNifx888Lk8lP0S4/C9Y5asWdcq2ClcG3Vjwt0IvJMRydykUWW6QfJrQPgj /Rofr/W3qpIAOYg9p5oXG8nRzm5yh7HTKPkVrgHXaLWDLbatbanYRFxgJOwH3FrHQ8Df 7KuZ2XuiHTpRWPQJKzhANErGSydU8FMVCbrTdT8sFERI9VlCTlua5e0BmWCiLdTAFeCw /YhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NJ9PcskJ; 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 m19-20020aa7c493000000b0043bbbe36139si107603edq.611.2022.08.11.11.20.56; Thu, 11 Aug 2022 11:21:25 -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=NJ9PcskJ; 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 S236556AbiHKRgD (ORCPT + 99 others); Thu, 11 Aug 2022 13:36:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231352AbiHKRf4 (ORCPT ); Thu, 11 Aug 2022 13:35:56 -0400 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DAB76A48D for ; Thu, 11 Aug 2022 10:35:56 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id 68so8534775iou.2 for ; Thu, 11 Aug 2022 10:35:56 -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=NJ9PcskJy7nr2SjTCl4gvdy0wSBjPffJjU2h/Z2dYq1Phl9+gYPeVXo4DIqTOSSG4S 4G9wuzt2TjUxrQXI5TYSOQ28Qtwy09xK7BYDDxBP4IPub7lczOuQ97P7VVf4YLQDJh0m JS3ukgNVw2+2O3nIREoCKYXbnmaB+aPZ4Qf7DM2OECxKEVWQBFg0rIJPZVw8SU8M7hw7 UjgsMOma2HU+IucUoSZSCI4SAb/xEzQtsPXXW57rJFgn82KpTLxXw6e0uOjZqRZg5G2u mwxB5lItFR2s3zTXHlSthyXpbP1BmdOzsQm64PgkmV7qVDrIU+8gQLf8utHmDsRRhnuZ QHdQ== 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=rXfjzhCE+opvhtLXponBEmvQtymJ0fCI20wA0ny5NhzYCKWk/WQ9EYMHwkvMrVvgig 2L8/efuJX4ySn2Q47YUuJkyfBVd+dAF5a9z3w8iOkWGK2llJwxhyYUG61rSwH5JsGsH/ A0EgK+lv6yu3WuIHXrRCTsMBUueiX7Ho+u6ZfPSlO9s+eORXeba9PjuDXNT6TLYdnT74 fdwSta1hBiJblcDt0PojdGP2VzVC6tyC/EknQ3zTD2tKcsFpy5lNWHYQtIgjnEZP5oKH DVU7EAJHLLTrsGr0eCaVp1I+VnG7sA4aO5qgaHVJINWQC9VIg4c5ZNObAQPbVAspPO4S mJFQ== X-Gm-Message-State: ACgBeo2HylGwhervXrMTAAtvjXLD7xELtw+BR/y9ensDlbSZJAiUvQUN uy1OhaOFZfgDMpMuy7VVxw4FStwkhv8= X-Received: by 2002:a05:6638:25cb:b0:341:6546:1534 with SMTP id u11-20020a05663825cb00b0034165461534mr182370jat.308.1660239355483; Thu, 11 Aug 2022 10:35:55 -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 n9-20020a056638110900b003435e8635bbsm27928jal.77.2022.08.11.10.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Aug 2022 10:35:55 -0700 (PDT) From: Jim Cromie To: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, jbaron@akamai.com Cc: Jim Cromie , Rasmus Villemoes Subject: [PATCH 02/11] dyndbg: fix module.dyndbg handling Date: Thu, 11 Aug 2022 11:35:32 -0600 Message-Id: <20220811173541.2901122-3-jim.cromie@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220811173541.2901122-1-jim.cromie@gmail.com> References: <20220811173541.2901122-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