From patchwork Mon Oct 24 11:30:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9384 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp478071wru; Mon, 24 Oct 2022 07:16:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5DW7J98oz9bA+QXbvDNqx7i9lR5SMoCyMqdDBfmJklupZtkahBaDPbMMk12t20B2R5hqbA X-Received: by 2002:a05:6402:3890:b0:45c:2b5:b622 with SMTP id fd16-20020a056402389000b0045c02b5b622mr31494092edb.69.1666621009307; Mon, 24 Oct 2022 07:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666621009; cv=none; d=google.com; s=arc-20160816; b=nHvpj+n6lgbsS0WDDqjwC36rFNTt4kBw+/2UGNKKLfq/n6DbzaCzvolQICdOn6yqi7 8kpF9ufv/9G/ZeVl77JjxNxXCa63aX1qdcTQmvCuSqARzfX/NfbnQmF91q7eOJ2+jpl5 PhDnDgOwoWxkGo69DebYI52P97K4Twedco0N0H9z5jT24tdVHHI2OXkrFVH+2CNCNT1T NXZUVF6eLXguzuXcjoLE/44aMu+aWcmoojb1plAZrkXZB3CLsB7PLD1mhayy5OIj7z+t 0wQ93O+eiP7w77SxHM3dJOImPFAHF1EXXWsuWCH4+uXeZ0ojwA/W0HEhY/OnzgMk39w/ c+/Q== 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=TbUt51XhZ/VFReESZ/V4+yvK2d25y9gYXK3eJzdjgKOjoPy3CS5CSzanPXG884KQNU IUgo8wQQXnMsrnwqiQIYJuiN0PhAo+pmAz4kqCVfjGySeU4eCGUb7+ir5HWQzPnc6iAK jl1CDEDCpq4JAXocLByBJOKlRuvQr4hpd2Lc92JzG0JfpXVfY1WnzX/7sTyJQZ0SiySY Fbhg4JuAFevAvQicnV1/oS58cVWhOBdr/z42nRCJmcRtSP1PCFoSeeH2mnHG2L4hNjhu qc9mh1ND6qkewadTdbqtW25rUSE3B4MQzZg0IgddQfbxr9gEV4YS6xwMrFUTSzX/tAL4 DvAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h1zltsGY; 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 e1-20020a50a681000000b0045c10a55f2fsi27975282edc.322.2022.10.24.07.16.23; Mon, 24 Oct 2022 07:16:49 -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=h1zltsGY; 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 S233411AbiJXODC (ORCPT + 99 others); Mon, 24 Oct 2022 10:03:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233689AbiJXOCA (ORCPT ); Mon, 24 Oct 2022 10:02:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1710C804AF; Mon, 24 Oct 2022 05:47:42 -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 5C9A3612BB; Mon, 24 Oct 2022 12:47:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72556C433D6; Mon, 24 Oct 2022 12:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615641; bh=2jkvL5g/HD5FsyAP8TMFn08xR4PzTjIkzrqUWM+1a30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h1zltsGYwinTc5sQVydGJeStuzW7zSVqOACRBKqajgLDRTORoyknR8ttT6YTlTC7g 7+SWNKZUkrMLTETXgjl8acAYD7bS9e2r66JUdx5cjImf2kZFzRjk7BEV0O1K+mOlD/ RYPwaEt00A1Chnrug9ipCd22KwvhRQlzMmTz+EUo= 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.15 298/530] dyndbg: fix module.dyndbg handling Date: Mon, 24 Oct 2022 13:30:42 +0200 Message-Id: <20221024113058.551730447@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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?1747578791440943216?= X-GMAIL-MSGID: =?utf-8?q?1747578791440943216?= 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");