[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240320124603.566923-1-ubizjak@gmail.com>
Date: Wed, 20 Mar 2024 13:45:49 +0100
From: Uros Bizjak <ubizjak@...il.com>
To: x86@...nel.org,
linux-kernel@...r.kernel.org
Cc: Uros Bizjak <ubizjak@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Andy Lutomirski <luto@...nel.org>,
Brian Gerst <brgerst@...il.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>
Subject: [PATCH] x86/percpu: Re-enable named address spaces with KASAN for GCC 13.3+
Commit 68fb3ca0e408 ("x86/percpu: Disable named address spaces for
KASAN") disabled support for named address spaces with KASAN due to
the incompatibility issue between named AS and KASAN.
GCC 13.3 has fixed this issue (GCC PR sanitizer/111736) so the
support for named address spaces can be re-enabled with KASAN
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@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
---
arch/x86/Kconfig | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 7aed87cbf386..09455d93b947 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2435,14 +2435,17 @@ endmenu
config CC_HAS_NAMED_AS
def_bool CC_IS_GCC && GCC_VERSION >= 120100
+config CC_HAS_NAMED_AS_FIXED_ASAN
+ 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 at the moment incompatible
- # with named address spaces - see GCC PR sanitizer/111736.
+ # -fsanitize=kernel-address (KASAN) is incompatible with named
+ # address spaces with GCC < 13.3 - see GCC PR sanitizer/111736.
#
- depends on !KASAN
+ depends on !KASAN || CC_HAS_NAMED_AS_FIXED_ASAN
config CC_HAS_SLS
def_bool $(cc-option,-mharden-sls=all)
--
2.44.0
Powered by blists - more mailing lists