From patchwork Sat Oct 22 07:24:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7468 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1098957wrr; Sat, 22 Oct 2022 01:12:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7nYR3/RERz22rEfZRG8ElImjb6+Y7z7edgPaEPhk1lN4gGqS4+e5s96CCHRd1nvi4LJq8D X-Received: by 2002:a17:90b:4f4a:b0:20c:64e2:2bf1 with SMTP id pj10-20020a17090b4f4a00b0020c64e22bf1mr27998903pjb.30.1666426335531; Sat, 22 Oct 2022 01:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666426335; cv=none; d=google.com; s=arc-20160816; b=Emz6Prc493OD5R7894gtqCk26wkerq+5RfO57uiH6Fds1oR7E38ew86AknzEDNRaTN N4OkK1IOfXrrZn8n3wGVReuVEh8+O5EIVaJfkhmDKLjSmGs9hIe9snztoTvAbJKQFVgS 3hml6n432SXoKu6YCdiZZmT4DAQHt1mRnGGTFYajobEVN4wTWA9chTSiK8JEW8OEaCPV e8BddswvNlGVvPupjO/CMzyIRJu1ng1ymovScnMLAwqm4QTx3I2m6zw8qYkGa6e5KNPI LdPdoD70nbzofWZtncXYfSUXXN3ctKFlqgcndqNe8ZOYRLhXuelEwAuEyf0KWfvnRwlq OHLg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jl55Qgzp+RLgEHvCwc7k6nsS6mMuqw05hq0ZPbqjkwU=; b=ghyELCbEbZs0UkMkvtFhECB8BQWx4kLJhjRiIzpqpRar7Wdk4Me5lT4wkE6NtHrPRF 814qmdYOK7RPZe3d6SgQ24juGQJDzgZURFhaMla1yotyB+ZVyNkyslw9fd/y78SsE4Nw 7bNP1bW+wJxUQ/T9jbGg7RbYxMYtV/ChhifuRpCHptSFI1TirrxMKnWera6ak9WYfSJQ bu7kPJzO88YUqmImXV99h7MZOcnf1ictTZCRdlikfP+rhcj6sK2Y3051S66N8kXpiO9W 0FPgeVlAMtkTqHReQKWpbygj6WUwvIR0HywYOXuldHiJwNYODggocItdScooOS6Soref 6czg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e43sFtW7; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020a6555cb000000b00438b7cb3311si30351398pgs.501.2022.10.22.01.12.02; Sat, 22 Oct 2022 01:12:15 -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=@linuxfoundation.org header.s=korg header.b=e43sFtW7; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233117AbiJVILc (ORCPT + 99 others); Sat, 22 Oct 2022 04:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233344AbiJVIJg (ORCPT ); Sat, 22 Oct 2022 04:09:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D64892D6E15; Sat, 22 Oct 2022 00:53:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7A95C60B39; Sat, 22 Oct 2022 07:53:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B215C433D7; Sat, 22 Oct 2022 07:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425182; bh=2jkvL5g/HD5FsyAP8TMFn08xR4PzTjIkzrqUWM+1a30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e43sFtW7co/spGAnxKuTC1cw7SIxJEvnYFxlIQcEY1eT7dWvXKSQ4OqlznkiwCXSH TxlTjBaM8EqsztQcUy6H+M8BjWkL3iAuf5xaW+irXIEDyTdrhJsY1xjA1B0BrUA0C0 1+i9+Jf2FZ1VMeMsogURds1/WmSOyY8MkrJfUGMo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rasmus Villemoes , Jason Baron , Daniel Vetter , Jim Cromie , Sasha Levin Subject: [PATCH 5.19 418/717] dyndbg: fix module.dyndbg handling Date: Sat, 22 Oct 2022 09:24:57 +0200 Message-Id: <20221022072516.751121067@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747374661115103136?= X-GMAIL-MSGID: =?utf-8?q?1747374661115103136?= From: Jim Cromie [ Upstream commit 85d6b66d31c35158364058ee98fb69ab5bb6a6b1 ] 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. Fixes: b48420c1d301 dynamic_debug: make dynamic-debug work for module initialization Reported-by: Rasmus Villemoes Acked-by: Jason Baron Acked-by: Daniel Vetter Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20220904214134.408619-3-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- 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");