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: <20230203123140.2227880-1-l.stelmach@samsung.com>
Date:   Fri,  3 Feb 2023 13:31:40 +0100
From:   Łukasz Stelmach <l.stelmach@...sung.com>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Marek Szyprowski <m.szyprowski@...sung.com>,
        Łukasz Stelmach <l.stelmach@...sung.com>,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] merge_config.sh: do not report some differencess between
 input and output

If an input config file contains CONFIG_FOO=n the output one
will contain a line '# CONFIG_FOO is not set'. merge_config.sh
should not report it as difference because the end result of
CONFIG_FOO being disabled is achieved.

Inexistence of CONFIG_FOO (because of unment dependencies) in case
CONFIG_FOO=n is requested, should also be ignored.

Signed-off-by: Łukasz Stelmach <l.stelmach@...sung.com>
---
 scripts/kconfig/merge_config.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index e5b46980c22a..c6fd6722f1a4 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -196,9 +196,13 @@ for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do
 	REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
 	ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG" || true)
 	if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
-		echo "Value requested for $CFG not in final .config"
-		echo "Requested value:  $REQUESTED_VAL"
-		echo "Actual value:     $ACTUAL_VAL"
-		echo ""
+		if [ "x$REQUESTED_VAL" != "x$CFG=n" -o \
+		     \( "x$ACTUAL_VAL" != "x"  -a \
+			"x$ACTUAL_VAL" != "x# $CFG is not set" \) ]; then
+			echo "Value requested for $CFG not in final .config"
+			echo "Requested value:  $REQUESTED_VAL"
+			echo "Actual value:     $ACTUAL_VAL"
+			echo ""
+		fi
 	fi
 done
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ