From 1edf9722d4071253c1591a54bfef91e71a7ed976 Mon Sep 17 00:00:00 2001 From: Vinayak Menon Date: Thu, 12 Mar 2020 12:21:47 +0530 Subject: [PATCH] arm64: kpti: force off kpti Since most of the CPUs aren't prone to meltdown, force off the kpti feature. Enable on required targets. Change-Id: If78c70bcaeac2b157a901e5036190aaf9e5aabf6 Signed-off-by: Vinayak Menon --- arch/arm64/kernel/cpufeature.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index b46e2dbfc5e4..c904d7f94de3 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -966,7 +966,8 @@ has_useable_cnp(const struct arm64_cpu_capabilities *entry, int scope) } static bool __meltdown_safe = true; -static int __kpti_forced; /* 0: not forced, >0: forced on, <0: forced off */ +/* 0: not forced, >0: forced on, <0: forced off */ +static int __kpti_forced = -1; static bool unmap_kernel_at_el0(const struct arm64_cpu_capabilities *entry, int scope)