Commit 9ebe5500 authored by Uros Bizjak's avatar Uros Bizjak Committed by Ingo Molnar

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

Commit:

  b6540de9 ("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: default avatarUros Bizjak <ubizjak@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20240402121926.78477-1-ubizjak@gmail.com
parent a55c1fda
...@@ -2431,19 +2431,18 @@ endmenu ...@@ -2431,19 +2431,18 @@ endmenu
config CC_HAS_NAMED_AS config CC_HAS_NAMED_AS
def_bool CC_IS_GCC && GCC_VERSION >= 90100 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 def_bool CC_IS_GCC && GCC_VERSION >= 130300
config USE_X86_SEG_SUPPORT config USE_X86_SEG_SUPPORT
def_bool y def_bool y
depends on CC_HAS_NAMED_AS depends on CC_HAS_NAMED_AS
# #
# -fsanitize=kernel-address (KASAN) is incompatible with named # -fsanitize=kernel-address (KASAN) and -fsanitize=thread
# address spaces with GCC < 13.3 - see GCC PR sanitizer/111736. # (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 depends on !(KASAN || KCSAN) || CC_HAS_NAMED_AS_FIXED_SANITIZERS
# -fsanitize=thread (KCSAN) is also incompatible.
depends on !KCSAN
config CC_HAS_SLS config CC_HAS_SLS
def_bool $(cc-option,-mharden-sls=all) def_bool $(cc-option,-mharden-sls=all)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment