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: <20250206175114.1974171-34-bvanassche@acm.org>
Date: Thu,  6 Feb 2025 09:51:14 -0800
From: Bart Van Assche <bvanassche@....org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Will Deacon <will@...nel.org>,
	Christoph Hellwig <hch@....de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Marco Elver <elver@...gle.com>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Nathan Chancellor <nathan@...nel.org>,
	Kees Cook <kees@...nel.org>,
	Jann Horn <jannh@...gle.com>,
	linux-kernel@...r.kernel.org,
	Bart Van Assche <bvanassche@....org>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>
Subject: [PATCH RFC 33/33] kbuild: clang: Unconditionally enable thread-safety checking

Enable thread-safety checks for arm64 and x86. Do not enable it for other
architectures yet - this will be done later. Disable thread-safety checking
for staging drivers. Fixing thread-safety bugs in staging drivers will have
to be done when these drivers come out of staging.

Cc: Nathan Chancellor <nathan@...nel.org>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Bill Wendling <morbo@...gle.com>
Cc: Justin Stitt <justinstitt@...gle.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Signed-off-by: Bart Van Assche <bvanassche@....org>
---
 drivers/staging/Makefile | 2 ++
 scripts/Makefile.clang   | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index e681e403509c..4eafda5b95eb 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -1,6 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0
 # Makefile for staging directory
 
+KBUILD_CFLAGS += -Wno-thread-safety
+
 obj-y				+= media/
 obj-$(CONFIG_RTL8723BS)		+= rtl8723bs/
 obj-$(CONFIG_OCTEON_ETHERNET)	+= octeon/
diff --git a/scripts/Makefile.clang b/scripts/Makefile.clang
index 2435efae67f5..d27688bddd95 100644
--- a/scripts/Makefile.clang
+++ b/scripts/Makefile.clang
@@ -36,5 +36,8 @@ CLANG_FLAGS	+= -Werror=unknown-warning-option
 CLANG_FLAGS	+= -Werror=ignored-optimization-argument
 CLANG_FLAGS	+= -Werror=option-ignored
 CLANG_FLAGS	+= -Werror=unused-command-line-argument
+
+CLANG_FLAGS	+= -Wthread-safety
+
 KBUILD_CPPFLAGS	+= $(CLANG_FLAGS)
 export CLANG_FLAGS

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ