bootconfig: Fixes for v6.9-rc3
Subsystems (2)
Masami Hiramatsu (Google)
maintainerHi Linus,
Bootconfig fixes for v6.9-rc3:
- fs/proc: Fix to not show original kernel cmdline more than twice on /proc/bootconfig.
- fs/proc: Fix to show the original cmdline only if the bootconfig modifies it.
Please pull the latest bootconfig-fixes-v6.9-rc3 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
bootconfig-fixes-v6.9-rc3
Tag SHA1: b0066d569a0eed92657edc836868122a6761da49 Head SHA1: c722cea208789d9e2660992bcd05fb9fac3adb56
Masami Hiramatsu (1):
fs/proc: Skip bootloader comment if no embedded kernel parameters
Zhenhua Huang (1):
fs/proc: remove redundant comments from /proc/bootconfig
----
fs/proc/bootconfig.c | 12 ++++++------ include/linux/bootconfig.h | 1 + init/main.c | 5 +++++ 3 files changed, 12 insertions(+), 6 deletions(-)
---------------------------
fs/proc/bootconfig.c +6 -6
@@ -62,12 +62,12 @@ static int __init copy_xbc_key_value_list(char *dst, size_t size)break ; dst += ret; } -if (ret >=0 && boot_command_line[0 ]) { - ret =snprintf (dst,rest (dst, end),"# Parameters from bootloader:\n# %s\n" , - boot_command_line); -if (ret >0 ) - dst += ret; - } + } +if (cmdline_has_extra_options () && ret >=0 && boot_command_line[0 ]) { + ret =snprintf (dst,rest (dst, end),"# Parameters from bootloader:\n# %s\n" , + boot_command_line); +if (ret >0 ) + dst += ret; } out:kfree (key);
include/linux/bootconfig.h +1 -0
@@ -10,6 +10,7 @@#ifdef __KERNEL__#include <linux/kernel.h> #include <linux/types.h> +bool __init cmdline_has_extra_options (void );#else /* !__KERNEL__ */ /* * NOTE: This is only for tools/bootconfig, because tools/bootconfig will
init/main.c +5 -0
@@ -487,6 +487,11 @@ static int __init warn_bootconfig(char *str)early_param ("bootconfig" , warn_bootconfig); +bool __init cmdline_has_extra_options (void ) +{ +return extra_command_line || extra_init_args; +} +/* Change NUL term back to "=", to make "param" the whole string. */ static void __init repair_env_string (char *param,char *val) {
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
The pull request you sent on Thu, 11 Apr 2024 10:06:21 +0900:
The pull request you sent on Thu, 11 Apr 2024 10:06:21 +0900:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.gitbootconfig-fixes-v6.9-rc3
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/03a55b63919f4b52b9c323d9a43ccccdc1cdb33b
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html