Thread (5 messages) 5 messages, 3 authors, 2021-07-28

Re: [PATCH 1/1] arm64/cpufeature: Add option to disable mte support

From: Marc Zyngier <maz@kernel.org>
Date: 2021-07-28 10:07:15
Also in: linux-arm-kernel
Subsystem: arm64 port (aarch64 architecture), the rest · Maintainers: Catalin Marinas, Will Deacon, Linus Torvalds

On Wed, 28 Jul 2021 10:42:58 +0100,
[off-list ref] wrote:
From: Yee Lee <redacted>

Add a static key to exapnd the logic of system_supports_mte().
This function controls mte enablement in both EL1 and EL0.

The static key, "arm64_mte_support" is default true and can
be disabled via the early_param.

Signed-off-by: Yee Lee <redacted>
---
 arch/arm64/include/asm/cpufeature.h |  4 +++-
 arch/arm64/kernel/cpufeature.c      | 13 +++++++++++++
 arch/arm64/kernel/image-vars.h      |  3 +++
 3 files changed, 19 insertions(+), 1 deletion(-)
This seems terribly complicated. How about this instead ("arm64.nomte"
on the command line)?

Thanks,

	M.
diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c
index 53a381a7f65d..eaf17beb2420 100644
--- a/arch/arm64/kernel/idreg-override.c
+++ b/arch/arm64/kernel/idreg-override.c
@@ -54,6 +54,7 @@ static const struct ftr_set_desc pfr1 __initconst = {
 	.override	= &id_aa64pfr1_override,
 	.fields		= {
 	        { "bt", ID_AA64PFR1_BT_SHIFT },
+	        { "mte", ID_AA64PFR1_MTE_SHIFT },
 		{}
 	},
 };
@@ -100,6 +101,7 @@ static const struct {
 	{ "arm64.nopauth",
 	  "id_aa64isar1.gpi=0 id_aa64isar1.gpa=0 "
 	  "id_aa64isar1.api=0 id_aa64isar1.apa=0"	   },
+	{ "arm64.nomte",		"id_aa64pfr1.mte=0" },
 	{ "nokaslr",			"kaslr.disabled=1" },
 };
 
-- 
Without deviation from the norm, progress is not possible.

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