Thread (88 messages) 88 messages, 4 authors, 2020-10-01

Re: [PATCH v3 29/39] arm64: mte: Switch GCR_EL1 in kernel entry and exit

From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2020-09-25 12:38:18
Also in: linux-mm, lkml

On Fri, Sep 25, 2020 at 12:50:23PM +0100, Vincenzo Frascino wrote:
On 9/25/20 12:34 PM, Catalin Marinas wrote:
quoted
On Fri, Sep 25, 2020 at 12:50:36AM +0200, Andrey Konovalov wrote:
quoted
+	/*
+	 * Calculate and set the exclude mask preserving
+	 * the RRND (bit[16]) setting.
+	 */
+	mrs_s	\tmp2, SYS_GCR_EL1
+	bfi	\tmp2, \tmp, #0, #16
+	msr_s	SYS_GCR_EL1, \tmp2
+	isb
+1:
+#endif
+	.endm
+
+	.macro mte_set_kernel_gcr, tsk, tmp, tmp2
What's the point of a 'tsk' argument here?
It is unused. I kept the interface same in between kernel and user.
I can either add a comment or remove it. Which one do you prefer?
Please remove it. Having the same interface is more confusing since you
have a single kernel gcr_excl but multiple user gcr_excl.

-- 
Catalin

_______________________________________________
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