[PATCH 0/1] arm64/cpufeature: Add an option for mte support

yee.lee at mediatek.com yee.lee at mediatek.com
Wed Jul 28 02:42:57 PDT 2021


From: Yee Lee <yee.lee at mediatek.com>

Arm64 introduced mte to enforce memory protection but also increased
the system requirements, such as the additional tag memory and the
firmware control complexity. For the case of products with limited 
resouce or low-power environment, the requirements to support mte 
is unlikely reached. Hence, a solution for low-end devices is 
necessary. 

This patch Add an option for mte support. An parameter from system
is used to indicate its states for all requirements. If not, mte
is disabled both in kernel and userspace. 

=== Test ===
QEMU5.2 + mte

passed cmdline : "arm64_mte_not_support"
boot log:
...(skip)
[    0.000000] CPU features: detected: Memory Tagging Extension
[    0.000000] CPU features: detected: Spectre-v2
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] CPU features: kernel page table isolation forced ON by KASLR
[    0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[    0.000000] CPU features: MTE is disabled since system does not support.

Yee Lee (1):
  arm64/cpufeature: Add option to disable mte support

 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(-)

-- 
2.18.0


More information about the Linux-mediatek mailing list