aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2018-04-09 13:48:49 -0700
committerAmit Pundir <amit.pundir@linaro.org>2018-08-30 16:15:46 +0530
commit69473c0b94cd3bfd9787f6e50f9d25b863c319f5 (patch)
tree0d191e89bd79eb69aede823051870fdf8164ce5b
parent8fbb6ffbbb04ed07062e3bd9ae14e3e7cc18ef2a (diff)
downloadlinaro-android-69473c0b94cd3bfd9787f6e50f9d25b863c319f5.tar.gz
ANDROID: arm64: mark kpti_install_ng_mappings as __nocfi
4.9.93 panics on boot when CFI_CLANG and UNMAP_KERNEL_AT_EL0 are both enabled. From Sami Tolvanen: "kpti_install_ng_mappings makes an indirect call to a physical address, which trips CFI. Adding the __nocfi attribute to this function should fix the problem." Bug: 77811249 Change-Id: I87d1ceb29f1ba2caee8954547596f4236bdfc31f Reported-by: Jean-Baptiste Theou <jb@essential.com> Signed-off-by: Greg Hackmann <ghackmann@google.com>
-rw-r--r--arch/arm64/kernel/cpufeature.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index e238b7932096..703ebe0de2f8 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -902,7 +902,7 @@ static bool unmap_kernel_at_el0(const struct arm64_cpu_capabilities *entry,
return !has_cpuid_feature(entry, scope);
}
-static void
+static void __nocfi
kpti_install_ng_mappings(const struct arm64_cpu_capabilities *__unused)
{
typedef void (kpti_remap_fn)(int, int, phys_addr_t);