Skip to content

Commit 9ebe550

Browse files
ubizjakIngo Molnar
authored andcommitted
x86/percpu: Re-enable named address spaces with sanitizers for GCC 13.3+
Commit: b6540de ("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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Linus Torvalds <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a55c1fd commit 9ebe550

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

arch/x86/Kconfig

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2431,19 +2431,18 @@ endmenu
24312431
config CC_HAS_NAMED_AS
24322432
def_bool CC_IS_GCC && GCC_VERSION >= 90100
24332433

2434-
config CC_HAS_NAMED_AS_FIXED_ASAN
2434+
config CC_HAS_NAMED_AS_FIXED_SANITIZERS
24352435
def_bool CC_IS_GCC && GCC_VERSION >= 130300
24362436

24372437
config USE_X86_SEG_SUPPORT
24382438
def_bool y
24392439
depends on CC_HAS_NAMED_AS
24402440
#
2441-
# -fsanitize=kernel-address (KASAN) is incompatible with named
2442-
# address spaces with GCC < 13.3 - see GCC PR sanitizer/111736.
2441+
# -fsanitize=kernel-address (KASAN) and -fsanitize=thread
2442+
# (KCSAN) are incompatible with named address spaces with
2443+
# GCC < 13.3 - see GCC PR sanitizer/111736.
24432444
#
2444-
depends on !KASAN || CC_HAS_NAMED_AS_FIXED_ASAN
2445-
# -fsanitize=thread (KCSAN) is also incompatible.
2446-
depends on !KCSAN
2445+
depends on !(KASAN || KCSAN) || CC_HAS_NAMED_AS_FIXED_SANITIZERS
24472446

24482447
config CC_HAS_SLS
24492448
def_bool $(cc-option,-mharden-sls=all)

0 commit comments

Comments
 (0)