Skip to contentSkip to conversation

xtensa, kasan: define KASAN_SHADOW_END

PATCH Applied [email protected] 1 participant 1 message Dec 25, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xtensa, kasan: define KASAN_SHADOW_END

From: Andrey Konovalov <[email protected]>

Common KASAN code might rely on the definitions of the shadow mapping start, end, and size. Define KASAN_SHADOW_END in addition to KASAN_SHADOW_START and KASAN_SHADOW_SIZE.

---

Andrew, please put this patch before
"kasan: improve kasan_non_canonical_hook".

---
 arch/xtensa/include/asm/kasan.h | 2 ++
 1 file changed, 2 insertions(+)
arch/xtensa/include/asm/kasan.h +2 -0
index 216b6f32c375..8d2b4248466f 100644
@@ -18,6 +18,8 @@
 #define KASAN_SHADOW_START (XCHAL_PAGE_TABLE_VADDR + XCHAL_PAGE_TABLE_SIZE)
 /* Size of the shadow map */
 #define KASAN_SHADOW_SIZE (-KASAN_START_VADDR >> KASAN_SHADOW_SCALE_SHIFT)
+/* End of the shadow map */
+#define KASAN_SHADOW_END (KASAN_SHADOW_START + KASAN_SHADOW_SIZE)
 /* Offset for mem to shadow address transformation */
 #define KASAN_SHADOW_OFFSET __XTENSA_UL_CONST(CONFIG_KASAN_SHADOW_OFFSET)
 
Signature · 1 line
2.25.1