public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Borislav Petkov <bp@alien8.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH 1/8] bootconfig: Set CONFIG_BOOT_CONFIG=n by default
Date: Thu, 20 Feb 2020 16:26:33 +0900	[thread overview]
Message-ID: <158218359349.6940.8460152450938960505.stgit@devnote2> (raw)
In-Reply-To: <158218358363.6940.18380270211351882136.stgit@devnote2>

Set CONFIG_BOOT_CONFIG=n by default. This also warns
user if CONFIG_BOOT_CONFIG=n but "bootconfig" is given
in the kernel command line.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 init/Kconfig         |    2 +-
 init/main.c          |    8 ++++++++
 kernel/trace/Kconfig |    3 ++-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index 4a672c6629d0..824f3763260d 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1218,7 +1218,7 @@ endif
 config BOOT_CONFIG
 	bool "Boot config support"
 	depends on BLK_DEV_INITRD
-	default y
+	default n
 	help
 	  Extra boot config allows system admin to pass a config file as
 	  complemental extension of kernel cmdline when booting.
diff --git a/init/main.c b/init/main.c
index 59248717c925..680ff7123705 100644
--- a/init/main.c
+++ b/init/main.c
@@ -418,6 +418,14 @@ static void __init setup_boot_config(const char *cmdline)
 }
 #else
 #define setup_boot_config(cmdline)	do { } while (0)
+
+static int __init warn_bootconfig(char *str)
+{
+	pr_err("WARNING: 'bootconfig' found on the kernel command line but CONFIG_BOOTCONFIG is not set.\n");
+	return 0;
+}
+early_param("bootconfig", warn_bootconfig);
+
 #endif
 
 /* Change NUL term back to "=", to make "param" the whole string. */
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 91e885194dbc..795c3e02d3f1 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -143,7 +143,8 @@ if FTRACE
 
 config BOOTTIME_TRACING
 	bool "Boot-time Tracing support"
-	depends on BOOT_CONFIG && TRACING
+	depends on TRACING
+	select BOOT_CONFIG
 	default y
 	help
 	  Enable developer to setup ftrace subsystem via supplemental


  reply	other threads:[~2020-02-20  7:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20  7:26 [PATCH 0/8] bootconfig: Update for the recent reports Masami Hiramatsu
2020-02-20  7:26 ` Masami Hiramatsu [this message]
2020-02-20  8:16   ` [PATCH 1/8] bootconfig: Set CONFIG_BOOT_CONFIG=n by default Geert Uytterhoeven
2020-02-20  8:55     ` Masami Hiramatsu
2020-02-20  7:26 ` [PATCH 2/8] bootconfig: Add bootconfig magic word for indicating bootconfig explicitly Masami Hiramatsu
2020-02-20  7:26 ` [PATCH 3/8] tools/bootconfig: Remove unneeded error message silencer Masami Hiramatsu
2020-02-20  7:27 ` [PATCH 4/8] bootconfig: Remove unneeded checksum Masami Hiramatsu
2020-02-20  7:27 ` [PATCH 5/8] bootconfig: Reject subkey and value on same parent key Masami Hiramatsu
2020-02-20  7:27 ` [PATCH 6/8] bootconfig: Overwrite value on same key by default Masami Hiramatsu
2020-02-20  7:27 ` [PATCH 7/8] bootconfig: Add append value operator support Masami Hiramatsu
2020-02-20  7:27 ` [PATCH 8/8] bootconfig: Print array as multiple commands for legacy command line Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=158218359349.6940.8460152450938960505.stgit@devnote2 \
    --to=mhiramat@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox