Thread (101 messages) 101 messages, 6 authors, 2020-09-18

Re: [PATCH 26/35] kasan, arm64: Enable TBI EL1

From: Vincenzo Frascino <vincenzo.frascino@arm.com>
Date: 2020-08-27 15:15:12
Also in: linux-mm, lkml


On 8/27/20 12:13 PM, Catalin Marinas wrote:
On Thu, Aug 27, 2020 at 12:05:55PM +0100, Vincenzo Frascino wrote:
quoted
On 8/27/20 11:40 AM, Catalin Marinas wrote:
quoted
On Fri, Aug 14, 2020 at 07:27:08PM +0200, Andrey Konovalov wrote:
quoted
diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S
index 152d74f2cc9c..6880ddaa5144 100644
--- a/arch/arm64/mm/proc.S
+++ b/arch/arm64/mm/proc.S
@@ -38,7 +38,7 @@
 /* PTWs cacheable, inner/outer WBWA */
 #define TCR_CACHE_FLAGS	TCR_IRGN_WBWA | TCR_ORGN_WBWA
 
-#ifdef CONFIG_KASAN_SW_TAGS
+#if defined(CONFIG_KASAN_SW_TAGS) || defined(CONFIG_KASAN_HW_TAGS)
 #define TCR_KASAN_FLAGS TCR_TBI1
 #else
 #define TCR_KASAN_FLAGS 0
I prefer to turn TBI1 on only if MTE is present. So on top of the v8
user series, just do this in __cpu_setup.
Not sure I understand... Enabling TBI1 only if MTE is present would break
KASAN_SW_TAGS which is based on TBI1 but not on MTE.
You keep the KASAN_SW_TAGS as above but for HW_TAGS, only set TBI1 later
in __cpu_setup().
Ok, sounds good.

-- 
Regards,
Vincenzo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help