]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
dyndbg: fix module.dyndbg handling
authorJim Cromie <jim.cromie@gmail.com>
Sun, 4 Sep 2022 21:40:39 +0000 (15:40 -0600)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 24 Nov 2022 13:24:35 +0000 (14:24 +0100)
commitc4429320b920972cc462cc6e9f18f99f48deca1f
treed8a6ff0a8e6c6bb2b506d44874b037af9e0ff69c
parent9f918df140377e1e3387bc545abb8aff3435cc99
dyndbg: fix module.dyndbg handling

BugLink: https://bugs.launchpad.net/bugs/1996825
[ 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 <linux@rasmusvillemoes.dk>
Acked-by: Jason Baron <jbaron@akamai.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20220904214134.408619-3-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/linux/dynamic_debug.h