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-next>] [day] [month] [year] [list]
Message-Id: <20180712125013.14285-1-ville.syrjala@linux.intel.com>
Date:   Thu, 12 Jul 2018 15:50:13 +0300
From:   Ville Syrjala <ville.syrjala@...ux.intel.com>
To:     linux-kbuild@...r.kernel.org
Cc:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        linux-kernel@...r.kernel.org,
        Ville Syrjälä 
        <ville.syrjala@...ux.intel.com>
Subject: [RFC][PATCH] kconfig: Add "m or y" and "y or m" answers for oldconfig

From: Ville Syrjälä <ville.syrjala@...ux.intel.com>

Make it possible to answer "m or y" or "y or m" to
oldconfig so that scripted kernel builds can easily
enable new features not present in the existing .config.

The particular use case I have in mind is continuous integration
where you probably want to test build any new features. Currently
you would have to either blindly try both 'y' and 'm' answers
or parse the output to know which one will be accepted.

Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: linux-kbuild@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@...ux.intel.com>
---
 scripts/kconfig/conf.c | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 671ff5364497..8038f9a6b9f4 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -201,15 +201,33 @@ static int conf_sym(struct menu *menu)
 			continue;
 		case 'm':
 		case 'M':
-			newval = mod;
-			if (!line[1])
+			if (!strcmp(line, "m or y") ||
+			    !strcmp(line, "M or Y")) {
+				if (sym_tristate_within_range(sym, mod))
+					newval = mod;
+				else
+					newval = yes;
 				break;
+			} else {
+				newval = mod;
+				if (!line[1])
+					break;
+			}
 			continue;
 		case 'y':
 		case 'Y':
-			newval = yes;
-			if (!line[1] || !strcmp(&line[1], "es"))
+			if (!strcmp(line, "y or m") ||
+			    !strcmp(line, "Y or M")) {
+				if (sym_tristate_within_range(sym, yes))
+					newval = yes;
+				else
+					newval = mod;
 				break;
+			} else {
+				newval = yes;
+				if (!line[1] || !strcmp(&line[1], "es"))
+					break;
+			}
 			continue;
 		case 0:
 			newval = oldval;
-- 
2.16.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ