* [GIT PULL] bootconfig: Fixes for v6.9-rc3
@ 2024-04-11 1:06 Masami Hiramatsu
2024-04-11 2:57 ` pr-tracker-bot
0 siblings, 1 reply; 2+ messages in thread
From: Masami Hiramatsu @ 2024-04-11 1:06 UTC (permalink / raw)
To: Linus Torvalds
Cc: Masami Hiramatsu, Zhenhua Huang, Steven Rostedt,
Masami Hiramatsu, linux-kernel
Hi 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(-)
---------------------------
diff --git a/fs/proc/bootconfig.c b/fs/proc/bootconfig.c
index 902b326e1e56..87dcaae32ff8 100644
--- a/fs/proc/bootconfig.c
+++ b/fs/proc/bootconfig.c
@@ -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);
diff --git a/include/linux/bootconfig.h b/include/linux/bootconfig.h
index ca73940e26df..e5ee2c694401 100644
--- a/include/linux/bootconfig.h
+++ b/include/linux/bootconfig.h
@@ -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
diff --git a/init/main.c b/init/main.c
index 2ca52474d0c3..881f6230ee59 100644
--- a/init/main.c
+++ b/init/main.c
@@ -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)
{
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [GIT PULL] bootconfig: Fixes for v6.9-rc3
2024-04-11 1:06 [GIT PULL] bootconfig: Fixes for v6.9-rc3 Masami Hiramatsu
@ 2024-04-11 2:57 ` pr-tracker-bot
0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2024-04-11 2:57 UTC (permalink / raw)
To: Masami Hiramatsu (Google)
Cc: Linus Torvalds, Masami Hiramatsu, Zhenhua Huang, Steven Rostedt,
Masami Hiramatsu, linux-kernel
The pull request you sent on Thu, 11 Apr 2024 10:06:21 +0900:
> git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git bootconfig-fixes-v6.9-rc3
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/03a55b63919f4b52b9c323d9a43ccccdc1cdb33b
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-11 2:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-11 1:06 [GIT PULL] bootconfig: Fixes for v6.9-rc3 Masami Hiramatsu
2024-04-11 2:57 ` pr-tracker-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®