Skip to contentSkip to conversation

kasan-add-memory-corruption-identification-support-for-hardware-tag-based-mode.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 6, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: kasan: add memory corruption identification support for hardware tag-based mode
has been removed from the -mm tree. Its filename was
kasan-add-memory-corruption-identification-support-for-hardware-tag-based-mode.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Kuan-Ying Lee <[email protected]>
Subject: kasan: add memory corruption identification support for hardware tag-based mode

Add memory corruption identification support for hardware tag-based mode. We store one old free pointer tag and free backtrace instead of five because hardware tag-based kasan only has 16 different tags.

If we store as many stacks as SW tag-based kasan does(5 stacks), there is high probability to find the same tag in the stacks when out-of-bound issues happened and we will mistake out-of-bound issue for use-after-free.

---

 lib/Kconfig.kasan |    2 +-
 mm/kasan/kasan.h  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib/Kconfig.kasan renamed from lib/Kconfig.kasan~kasan-add-memory-corruption-identification-support-for-hardware-tag-based-mode +1 -1
@@ -169,7 +169,7 @@ config KASAN_STACK
 
 config KASAN_TAGS_IDENTIFY
 	bool "Enable memory corruption identification"
-	depends on KASAN_SW_TAGS
+	depends on KASAN_SW_TAGS || KASAN_HW_TAGS
 	help
 	  This option enables best-effort identification of bug type
 	  (use-after-free or out-of-bounds) at the cost of increased
mm/kasan/kasan.h renamed from mm/kasan/kasan.h~kasan-add-memory-corruption-identification-support-for-hardware-tag-based-mode +1 -1
@@ -153,7 +153,7 @@ struct kasan_track {
 	depot_stack_handle_t stack;
 };
 
-#ifdef CONFIG_KASAN_TAGS_IDENTIFY
+#if defined(CONFIG_KASAN_TAGS_IDENTIFY) && defined(CONFIG_KASAN_SW_TAGS)
 #define KASAN_NR_FREE_STACKS 5
 #else
 #define KASAN_NR_FREE_STACKS 1

_

Patches currently in -mm which might be from [email protected] are