lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1535968916-9159-2-git-send-email-yamada.masahiro@socionext.com>
Date:   Mon,  3 Sep 2018 19:01:54 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     linux-kbuild@...r.kernel.org
Cc:     Sam Ravnborg <sam@...nborg.org>,
        Javier Martinez Canillas <javierm@...hat.com>,
        Laura Abbott <labbott@...hat.com>,
        Jiri Kosina <jkosina@...e.cz>,
        Ben Hutchings <ben.hutchings@...ethink.co.uk>,
        Michal Such«”nek <msuchanek@...e.de>,
        Takashi Iwai <tiwai@...e.de>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jonathan Corbet <corbet@....net>,
        Michal Marek <michal.lkml@...kovi.net>
Subject: [RFC PATCH 1/3] kconfig: support an environment variable for non-interactive syncconfig

When Kconfig files are updated, or build environments etc. are changed,
'make syncconfig' is invoked, which will show prompts if new config
options are available.  Users must explicitly input values for all
new symbols.  This is the conventional behavior for the kernel build.

However, it would be useful to process this non-interactively in such
cases as package building.

Package maintainers create source packages with the .config configured
on their machines.  Package builders may work on different machine
environments, where different compilers are installed.

With the recent changes in Kconfig, the .config contents depend on
the compiler.  During package building, it is not sensible to show
prompts for new symbols; it would be just annoys script automation.

Add a new switch, KCONFIG_NONINTERACTIVE_UPDATE.  If this environment
variable is set, Kconfig will sync the configuration non-interactively.
All new symbols are silently set to their default values.

Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
---

 Documentation/kbuild/kconfig.txt | 6 ++++++
 scripts/kconfig/conf.c           | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index 68c8291..5c29c3f 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -129,6 +129,12 @@ KCONFIG_NOSILENTUPDATE
 If this variable has a non-blank value, it prevents silent kernel
 config updates (requires explicit updates).
 
+KCONFIG_NONINTERACTIVE_UPDATE
+--------------------------------------------------
+If this variable has a non-blank value, it prevents user input prompts
+from showing up even when new symbols are available.  All new symbols
+are silently set to their default values.
+
 KCONFIG_AUTOCONFIG
 --------------------------------------------------
 This environment variable can be set to specify the path & name of the
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 7b2b372..b64bbc0 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -680,6 +680,11 @@ int main(int ac, char **av)
 	case oldconfig:
 	case listnewconfig:
 	case syncconfig:
+		if (input_mode == syncconfig) {
+			name = getenv("KCONFIG_NONINTERACTIVE_UPDATE");
+			if (name && *name)
+				break;
+		}
 		/* Update until a loop caused no more changes */
 		do {
 			conf_cnt = 0;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ