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: <20220507131146.834810-2-mailhol.vincent@wanadoo.fr>
Date:   Sat,  7 May 2022 22:11:44 +0900
From:   Vincent Mailhol <mailhol.vincent@...adoo.fr>
To:     Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Will Deacon <will@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Boqun Feng <boqun.feng@...il.com>,
        Mark Rutland <mark.rutland@....com>
Cc:     linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Rikard Falkeborn <rikard.falkeborn@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Kees Cook <keescook@...omium.org>,
        Vincent Mailhol <mailhol.vincent@...adoo.fr>
Subject: [RFC PATCH v2 1/2] check-atomiscs: stop build if CONFIG_WERROR=y

If CONFIG_WERROR=y, stop the build if one of the generated atomics
header in include/linux/atomic/* is modified by returning an error
instead of a warning.

If CONFIG_WERROR is not set, behavior is unchanged (let the build
continue).

Signed-off-by: Vincent Mailhol <mailhol.vincent@...adoo.fr>
---
 scripts/atomic/check-atomics.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/atomic/check-atomics.sh b/scripts/atomic/check-atomics.sh
index 0e7bab3eb0d1..56f9e753bc74 100755
--- a/scripts/atomic/check-atomics.sh
+++ b/scripts/atomic/check-atomics.sh
@@ -26,8 +26,13 @@ while read header; do
 	NEWSUM="${NEWSUM%% *}"
 
 	if [ "${OLDSUM}" != "${NEWSUM}" ]; then
-		printf "warning: generated include/${header} has been modified.\n"
+		if grep -q CONFIG_WERROR=y .config; then
+			printf "error: generated include/${header} has been modified.\n"
+			exit 1
+		else
+			printf "warning: generated include/${header} has been modified.\n"
+		fi
 	fi
 done
 
-exit 0
+exit $?
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ