aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2020-12-10 15:42:11 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2020-12-16 18:02:59 +1100
commita6fd024dc02f2d2b1e2ff0be1539d2ca900f558e (patch)
tree68b18edaa9e0d31100abf1bc78b1c40f26d48acc
parentdd6870f3218e4f59b9a97379fac0d7611a4381ef (diff)
downloadlinux-a6fd024dc02f2d2b1e2ff0be1539d2ca900f558e.tar.gz
arm64: mte: ensure CONFIG_ARM64_PAN is enabled with MTE
The uaccess routines like get/put_user() rely on the user TCF0 mode setting for tag checking. However, if CONFIG_ARM64_PAN is disabled, these routines would use the standard LDR/STR instructions and therefore the kernel TCF mode. In 5.10, the kernel TCF==0, so no tag checking, but this will change with the in-kernel MTE support. Make ARM64_MTE depend on ARM64_PAN. Link: https://lkml.kernel.org/r/20201203102628.GB2224@gaia Fixes: 89b94df9dfb1 ("arm64: mte: Kconfig entry") Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Cc: Andrey Konovalov <andreyknvl@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r--arch/arm64/Kconfig2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index d32aa817117a..35ac59986e42 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1650,6 +1650,8 @@ config ARM64_MTE
default y
depends on ARM64_AS_HAS_MTE && ARM64_TAGGED_ADDR_ABI
depends on AS_HAS_ARMV8_5
+ # Required for tag checking in the uaccess routines
+ depends on ARM64_PAN
select ARCH_USES_HIGH_VMA_FLAGS
help
Memory Tagging (part of the ARMv8.5 Extensions) provides