[tip: x86/percpu] x86/percpu: Re-enable named address spaces with sanitizers for GCC 13.3+

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following commit has been merged into the x86/percpu branch of tip:

Commit-ID:     9ebe5500d4b25ee4cde04eec59a6764361a60709
Gitweb:        https://git.kernel.org/tip/9ebe5500d4b25ee4cde04eec59a6764361a60709
Author:        Uros Bizjak <ubizjak@xxxxxxxxx>
AuthorDate:    Tue, 02 Apr 2024 14:19:08 +02:00
Committer:     Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Wed, 03 Apr 2024 08:59:15 +02:00

x86/percpu: Re-enable named address spaces with sanitizers for GCC 13.3+

Commit:

  b6540de9b5c8 ("x86/percpu: Disable named address spaces for KASAN")

.. disabled support for named address spaces with KCSAN due to
the incompatibility issue between named AS and KCSAN.

GCC 13.3 has fixed this issue (GCC PR sanitizer/111736) so the
support for named address spaces can be re-enabled with sanitizers
for GCC compiler version >= 13.3.

[ Note that the patch considers GCC 14 to be fixed - if somebody is
  using snapshots of the GCC 14 before the fix, they should upgrade. ]

Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20240402121926.78477-1-ubizjak@xxxxxxxxx
---
 arch/x86/Kconfig | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f1c020d..9332bad 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2431,19 +2431,18 @@ endmenu
 config CC_HAS_NAMED_AS
 	def_bool CC_IS_GCC && GCC_VERSION >= 90100
 
-config CC_HAS_NAMED_AS_FIXED_ASAN
+config CC_HAS_NAMED_AS_FIXED_SANITIZERS
 	def_bool CC_IS_GCC && GCC_VERSION >= 130300
 
 config USE_X86_SEG_SUPPORT
 	def_bool y
 	depends on CC_HAS_NAMED_AS
 	#
-	# -fsanitize=kernel-address (KASAN) is incompatible with named
-	# address spaces with GCC < 13.3 - see GCC PR sanitizer/111736.
+	# -fsanitize=kernel-address (KASAN) and -fsanitize=thread
+	# (KCSAN) are incompatible with named address spaces with
+	# GCC < 13.3 - see GCC PR sanitizer/111736.
 	#
-	depends on !KASAN || CC_HAS_NAMED_AS_FIXED_ASAN
-	# -fsanitize=thread (KCSAN) is also incompatible.
-	depends on !KCSAN
+	depends on !(KASAN || KCSAN) || CC_HAS_NAMED_AS_FIXED_SANITIZERS
 
 config CC_HAS_SLS
 	def_bool $(cc-option,-mharden-sls=all)




[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux