Skip to contentSkip to conversation

mm-page-flags-layouth-change-the-kasan_tag_width-for-hw_tags.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message May 13, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: page-flags-layout.h: change the KASAN_TAG_WIDTH for HW_TAGS
has been removed from the -mm tree. Its filename was
mm-page-flags-layouth-change-the-kasan_tag_width-for-hw_tags.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Guilherme Giacomo Simoes <[email protected]>
Subject: mm: page-flags-layout.h: change the KASAN_TAG_WIDTH for HW_TAGS
Date: Mon, 28 Apr 2025 17:14:09 -0300

KASAN_TAG_WIDTH is 8 bits for both (HW_TAGS and SW_TAGS), but for HW_TAGS the KASAN_TAG_WIDTH can be 4 bits bits because due to the design of the MTE the memory words for storing metadata only need 4 bits. Change the preprocessor define KASAN_TAG_WIDTH for check if SW_TAGS is define, so KASAN_TAG_WIDTH should be 8 bits, but if HW_TAGS is define, so KASAN_TAG_WIDTH should be 4 bits to save a few flags bits.

---

 include/linux/page-flags-layout.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
include/linux/page-flags-layout.h renamed from include/linux/page-flags-layout.h~mm-page-flags-layouth-change-the-kasan_tag_width-for-hw_tags +3 -1
@@ -72,8 +72,10 @@
 #define NODE_NOT_IN_PAGE_FLAGS	1
 #endif
 
-#if defined(CONFIG_KASAN_SW_TAGS) || defined(CONFIG_KASAN_HW_TAGS)
+#if defined(CONFIG_KASAN_SW_TAGS)
 #define KASAN_TAG_WIDTH 8
+#elif defined(CONFIG_KASAN_HW_TAGS)
+#define KASAN_TAG_WIDTH 4
 #else
 #define KASAN_TAG_WIDTH 0
 #endif

_

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