[PATCH 1/1] arm64/cpufeature: Add option to disable mte support
Marc Zyngier
maz at kernel.org
Wed Jul 28 03:04:53 PDT 2021
On Wed, 28 Jul 2021 10:42:58 +0100,
<yee.lee at mediatek.com> wrote:
>
> From: Yee Lee <yee.lee at mediatek.com>
>
> 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 <yee.lee at mediatek.com>
> ---
> 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.
More information about the Linux-mediatek
mailing list