summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/memory.h
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2019-11-27 10:51:13 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2020-09-03 18:26:31 +0200
commit0178dc7613684561ff3bb1625cd5504f1e7fbe3d (patch)
treee2ecb07f1cab6a6d46e5f7d5c6cfeca88b22b38e /arch/arm64/include/asm/memory.h
parentarm64: mte: system register definitions (diff)
downloadlinux-0178dc7613684561ff3bb1625cd5504f1e7fbe3d.tar.xz
linux-0178dc7613684561ff3bb1625cd5504f1e7fbe3d.zip
arm64: mte: Use Normal Tagged attributes for the linear map
Once user space is given access to tagged memory, the kernel must be able to clear/save/restore tags visible to the user. This is done via the linear mapping, therefore map it as such. The new MT_NORMAL_TAGGED index for MAIR_EL1 is initially mapped as Normal memory and later changed to Normal Tagged via the cpufeature infrastructure. From a mismatched attribute aliases perspective, the Tagged memory is considered a permission and it won't lead to undefined behaviour. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Suzuki K Poulose <Suzuki.Poulose@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/memory.h')
-rw-r--r--arch/arm64/include/asm/memory.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
index afa722504bfd..1e0a78266410 100644
--- a/arch/arm64/include/asm/memory.h
+++ b/arch/arm64/include/asm/memory.h
@@ -133,6 +133,7 @@
#define MT_NORMAL_NC 3
#define MT_NORMAL 4
#define MT_NORMAL_WT 5
+#define MT_NORMAL_TAGGED 6
/*
* Memory types for Stage-2 translation