This is a note to let you know that I've just added the patch titled dyndbg: make dyndbg a known cli param to the 5.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: dyndbg-make-dyndbg-a-known-cli-param.patch and it can be found in the queue-5.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 450ed3f87e7200cd0c1df8eba52cbab429115cad Author: Andrew Halaney <ahalaney@xxxxxxxxxx> Date: Wed Oct 13 11:40:20 2021 -0400 dyndbg: make dyndbg a known cli param [ Upstream commit 5ca173974888368fecfb17ae6fe455df5fd2a9d2 ] Right now dyndbg shows up as an unknown parameter if used on boot: Unknown command line parameters: dyndbg=+p That's because it is unknown, it doesn't sit in the __param section, so the processing done to warn users supplying an unknown parameter doesn't think it is legitimate. Install a dummy handler to register it. dynamic debug needs to search the whole command line for modules listed that are currently builtin, so there's no real work to be done in this callback. Fixes: 86d1919a4fb0 ("init: print out unknown kernel parameters") Tested-by: Jim Cromie <jim.cromie@xxxxxxxxx> Signed-off-by: Andrew Halaney <ahalaney@xxxxxxxxxx> Signed-off-by: Jason Baron <jbaron@xxxxxxxxxx> Link: https://lore.kernel.org/r/1634139622-20667-2-git-send-email-jbaron@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index cb5abb42c16a2..84c16309cc637 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -761,6 +761,18 @@ static __init int ddebug_setup_query(char *str) __setup("ddebug_query=", ddebug_setup_query); +/* + * Install a noop handler to make dyndbg look like a normal kernel cli param. + * This avoids warnings about dyndbg being an unknown cli param when supplied + * by a user. + */ +static __init int dyndbg_setup(char *str) +{ + return 1; +} + +__setup("dyndbg=", dyndbg_setup); + /* * File_ops->write method for <debugfs>/dynamic_debug/control. Gathers the * command text from userspace, parses and executes it.