Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6817859rwi; Mon, 24 Oct 2022 06:31:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4zbsDyw76LnVu0Z8doVMM+PfT24USuwCM9OPWc2EsyYTxYIdZQnS/UzPMIA3PJZHt0GC5L X-Received: by 2002:a17:902:e5c9:b0:186:4f8a:d6a with SMTP id u9-20020a170902e5c900b001864f8a0d6amr31033108plf.150.1666618317927; Mon, 24 Oct 2022 06:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618317; cv=none; d=google.com; s=arc-20160816; b=veklE3U/neZLCOarCot/M7TmMA08Oc8aW9KDkNCqLYpxMK9vifb++MfNIb66h/RVPN 1F5n3DlAt1b/iknta2T9sN3Mtpo4OI7CHqhP3mWrFlSyHljgCDJCU4VYVL0uxCw8pyek SvstrA/8+4a1SB0kPXxyyTkgE4xIXJVGu/GV/i/Dkydljio/8HBeiHyTRcCYHD5lKMGA o6+V60Ds59qSCdcT8Z9Uc3XfdD0jebj4euS5CCkdclOT+TIPdqB7dDydVLscswi3Xtsr 8BVhQG3BWJEygzhUCdR1oqILx6upFzJkVQTqbsIrfjPuTKBJI0QpFqB2SNx3EGEM7BB5 nxkQ== 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=xVSIX12qppkNni78MxVYb27yW9XD9izW74viCC61gOg=; b=ta46tUe5uYhYj4bYj80Eoc9SDKNEoa3cu+Kx3Yjcx+scLgkqfSEdfMHG+WLf4bCkJd 6b+p8u1GJElGv2vQXsiDZCKbL+mqmoF/UTkKF0xwO2n6sFRPyGGq0pt0TlRcw06q4wtm QBxyMIhTdHt+ZD6dMmxO0I8PfZb2IVYeMTJx3usIOVzwMSH7++Brlf6uwlA77BPb+YS5 vFvn9d2pkKWA4u2g6OvTZI0XmqrjMccEbRhRAJEGDHhV7dOtUMJPK7KTbOKpXRAgt+EL /sZ50QTRkKYORKQDHONyjqUAS8CMCGwVcDBSXaMi0zT3S88d+/04nJKFGdMAOC7rs1OB SIDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iQGydnCT; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j18-20020a170902da9200b00179f8a3f838si39434796plx.593.2022.10.24.06.31.45; Mon, 24 Oct 2022 06:31:57 -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=iQGydnCT; 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 S233419AbiJXMVo (ORCPT + 99 others); Mon, 24 Oct 2022 08:21:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233516AbiJXMTn (ORCPT ); Mon, 24 Oct 2022 08:19:43 -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 95A698285C; Mon, 24 Oct 2022 04:58:14 -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 D657A61254; Mon, 24 Oct 2022 11:50:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E94C1C433C1; Mon, 24 Oct 2022 11:50:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612255; bh=3woiI64PEx05HutrOLVRH3ZjdrzIYvUydoHTUwinAaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iQGydnCTDjmWfYHWMuCr8s3j2wHwogakGxwV4NZUlpREZWiwwNieVwUAAC2zHTIkV mtTA5/Xl8jqWweLUPgrsCFe9TvngU+3zfg1OeVam6i89j6PbVArwWq2fPnZgl5T2Em U315CMcTiS3N79NY+2+JFOk1nnrXcwmAB8lpzBhw= 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 4.14 128/210] dyndbg: fix module.dyndbg handling Date: Mon, 24 Oct 2022 13:30:45 +0200 Message-Id: <20221024113001.142535065@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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 2fd8006153c3..921649db00f9 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -168,7 +168,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.35.1