Skip to content

Commit 237ab03

Browse files
melverwilldeacon
authored andcommitted
Revert "kasan: Disable Software Tag-Based KASAN with GCC"
This reverts commit 7aed6a2. Now that __no_sanitize_address attribute is fixed for KASAN_SW_TAGS with GCC, allow re-enabling KASAN_SW_TAGS with GCC. Cc: Andrey Konovalov <andreyknvl@gmail.com> Cc: Andrew Pinski <pinskia@gmail.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Marco Elver <elver@google.com> Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com> Link: https://lore.kernel.org/r/20241021120013.3209481-2-elver@google.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 894b00a commit 237ab03

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/Kconfig.kasan

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ config ARCH_DISABLE_KASAN_INLINE
2222
config CC_HAS_KASAN_GENERIC
2323
def_bool $(cc-option, -fsanitize=kernel-address)
2424

25-
# GCC appears to ignore no_sanitize_address when -fsanitize=kernel-hwaddress
26-
# is passed. See https://bugzilla.kernel.org/show_bug.cgi?id=218854 (and
27-
# the linked LKML thread) for more details.
2825
config CC_HAS_KASAN_SW_TAGS
29-
def_bool !CC_IS_GCC && $(cc-option, -fsanitize=kernel-hwaddress)
26+
def_bool $(cc-option, -fsanitize=kernel-hwaddress)
3027

3128
# This option is only required for software KASAN modes.
3229
# Old GCC versions do not have proper support for no_sanitize_address.
@@ -101,7 +98,7 @@ config KASAN_SW_TAGS
10198
help
10299
Enables Software Tag-Based KASAN.
103100

104-
Requires Clang.
101+
Requires GCC 11+ or Clang.
105102

106103
Supported only on arm64 CPUs and relies on Top Byte Ignore.
107104

0 commit comments

Comments
 (0)