summaryrefslogtreecommitdiffstats
path: root/arch/arm64/lib/Makefile
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2020-05-04 15:42:36 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2020-09-04 13:46:06 +0200
commit34bfeea4a9e9cdae713637541f240c3adfdfede3 (patch)
treeb4e13c4df48e00547764673d4d6ceec187ecf5b3 /arch/arm64/lib/Makefile
parentmm: Preserve the PG_arch_2 flag in __split_huge_page_tail() (diff)
downloadlinux-34bfeea4a9e9cdae713637541f240c3adfdfede3.tar.xz
linux-34bfeea4a9e9cdae713637541f240c3adfdfede3.zip
arm64: mte: Clear the tags when a page is mapped in user-space with PROT_MTE
Pages allocated by the kernel are not guaranteed to have the tags zeroed, especially as the kernel does not (yet) use MTE itself. To ensure the user can still access such pages when mapped into its address space, clear the tags via set_pte_at(). A new page flag - PG_mte_tagged (PG_arch_2) - is used to track pages with valid allocation tags. Since the zero page is mapped as pte_special(), it won't be covered by the above set_pte_at() mechanism. Clear its tags during early MTE initialisation. Co-developed-by: Steven Price <steven.price@arm.com> Signed-off-by: Steven Price <steven.price@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/lib/Makefile')
-rw-r--r--arch/arm64/lib/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile
index 2fc253466dbf..d31e1169d9b8 100644
--- a/arch/arm64/lib/Makefile
+++ b/arch/arm64/lib/Makefile
@@ -16,3 +16,5 @@ lib-$(CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE) += uaccess_flushcache.o
obj-$(CONFIG_CRC32) += crc32.o
obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
+
+obj-$(CONFIG_ARM64_MTE) += mte.o