|
Takashi Iwai |
410622 |
From a3d0bfc22a991effe7005bcb593f9f72ff866f41 Mon Sep 17 00:00:00 2001
|
|
Takashi Iwai |
410622 |
From: Marco Elver <elver@google.com>
|
|
Takashi Iwai |
410622 |
Date: Fri, 24 Sep 2021 15:43:23 -0700
|
|
Takashi Iwai |
410622 |
Subject: [PATCH] kasan: fix Kconfig check of CC_HAS_WORKING_NOSANITIZE_ADDRESS
|
|
Takashi Iwai |
410622 |
Git-commit: fa360beac4b62d54879a88b182afef4b369c9700
|
|
Takashi Iwai |
410622 |
Patch-mainline: v5.15-rc3
|
|
Takashi Iwai |
410622 |
References: stable-5.14.10
|
|
Takashi Iwai |
410622 |
|
|
Takashi Iwai |
410622 |
[ Upstream commit fa360beac4b62d54879a88b182afef4b369c9700 ]
|
|
Takashi Iwai |
410622 |
|
|
Takashi Iwai |
410622 |
In the main KASAN config option CC_HAS_WORKING_NOSANITIZE_ADDRESS is
|
|
Takashi Iwai |
410622 |
checked for instrumentation-based modes. However, if
|
|
Takashi Iwai |
410622 |
HAVE_ARCH_KASAN_HW_TAGS is true all modes may still be selected.
|
|
Takashi Iwai |
410622 |
|
|
Takashi Iwai |
410622 |
To fix, also make the software modes depend on
|
|
Takashi Iwai |
410622 |
CC_HAS_WORKING_NOSANITIZE_ADDRESS.
|
|
Takashi Iwai |
410622 |
|
|
Takashi Iwai |
410622 |
Link: https://lkml.kernel.org/r/20210910084240.1215803-1-elver@google.com
|
|
Takashi Iwai |
410622 |
Fixes: 6a63a63ff1ac ("kasan: introduce CONFIG_KASAN_HW_TAGS")
|
|
Takashi Iwai |
410622 |
Signed-off-by: Marco Elver <elver@google.com>
|
|
Takashi Iwai |
410622 |
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
|
|
Takashi Iwai |
410622 |
Cc: Alexander Potapenko <glider@google.com>
|
|
Takashi Iwai |
410622 |
Cc: Andrey Konovalov <andreyknvl@gmail.com>
|
|
Takashi Iwai |
410622 |
Cc: Dmitry Vyukov <dvyukov@google.com>
|
|
Takashi Iwai |
410622 |
Cc: Aleksandr Nogikh <nogikh@google.com>
|
|
Takashi Iwai |
410622 |
Cc: Taras Madan <tarasmadan@google.com>
|
|
Takashi Iwai |
410622 |
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
|
Takashi Iwai |
410622 |
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Takashi Iwai |
410622 |
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
|
Takashi Iwai |
410622 |
Acked-by: Takashi Iwai <tiwai@suse.de>
|
|
Takashi Iwai |
410622 |
|
|
Takashi Iwai |
410622 |
---
|
|
Takashi Iwai |
410622 |
lib/Kconfig.kasan | 2 ++
|
|
Takashi Iwai |
410622 |
1 file changed, 2 insertions(+)
|
|
Takashi Iwai |
410622 |
|
|
Takashi Iwai |
410622 |
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
|
|
Takashi Iwai |
410622 |
index 1e2d10f86011..cdc842d090db 100644
|
|
Takashi Iwai |
410622 |
--- a/lib/Kconfig.kasan
|
|
Takashi Iwai |
410622 |
+++ b/lib/Kconfig.kasan
|
|
Takashi Iwai |
410622 |
@@ -66,6 +66,7 @@ choice
|
|
Takashi Iwai |
410622 |
config KASAN_GENERIC
|
|
Takashi Iwai |
410622 |
bool "Generic mode"
|
|
Takashi Iwai |
410622 |
depends on HAVE_ARCH_KASAN && CC_HAS_KASAN_GENERIC
|
|
Takashi Iwai |
410622 |
+ depends on CC_HAS_WORKING_NOSANITIZE_ADDRESS
|
|
Takashi Iwai |
410622 |
select SLUB_DEBUG if SLUB
|
|
Takashi Iwai |
410622 |
select CONSTRUCTORS
|
|
Takashi Iwai |
410622 |
help
|
|
Takashi Iwai |
410622 |
@@ -86,6 +87,7 @@ config KASAN_GENERIC
|
|
Takashi Iwai |
410622 |
config KASAN_SW_TAGS
|
|
Takashi Iwai |
410622 |
bool "Software tag-based mode"
|
|
Takashi Iwai |
410622 |
depends on HAVE_ARCH_KASAN_SW_TAGS && CC_HAS_KASAN_SW_TAGS
|
|
Takashi Iwai |
410622 |
+ depends on CC_HAS_WORKING_NOSANITIZE_ADDRESS
|
|
Takashi Iwai |
410622 |
select SLUB_DEBUG if SLUB
|
|
Takashi Iwai |
410622 |
select CONSTRUCTORS
|
|
Takashi Iwai |
410622 |
help
|
|
Takashi Iwai |
410622 |
--
|
|
Takashi Iwai |
410622 |
2.26.2
|
|
Takashi Iwai |
410622 |
|