Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f31c0b1d authored by Greg Hackmann's avatar Greg Hackmann Committed by Alistair Strachan
Browse files

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
Bug: 133186739
Change-Id: I87d1ceb29f1ba2caee8954547596f4236bdfc31f
Reported-by: default avatarJean-Baptiste Theou <jb@essential.com>
Signed-off-by: default avatarGreg Hackmann <ghackmann@google.com>
parent 04464eb2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -916,7 +916,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);