ANDROID: arm64: mark kpti_install_ng_mappings as __nocfi
authorGreg Hackmann <ghackmann@google.com>
Mon, 9 Apr 2018 20:48:49 +0000 (13:48 -0700)
committerGreg Hackmann <ghackmann@google.com>
Mon, 9 Apr 2018 21:25:12 +0000 (14:25 -0700)
commiteba1ffe631bc5e379ebce8342c287c47f4549c16
tree1b7358ccd782c8a3be3deab754f62a5fe3274de2
parent05baf14727f31a229a57e527a6aeaa3ce8450c12
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>
arch/arm64/kernel/cpufeature.c