From 5f2b3c57b9b26ae367e847c52db982bfd1b2806c Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Wed, 16 Oct 2019 11:42:11 -0700 Subject: [PATCH] ANDROID: BACKPORT: x86/extable: Do not mark exception callback as CFI The exception table entries are constructed out of a relative offset and point to the actual function, not the CFI table entry. For now, just mark the caller as not checking CFI. The failure is most visible at boot with CONFIG_DEBUG_RODATA_TEST=y. Bug: 145297900 Change-Id: Ia5e9da358c41b8e8a08e253926ed31775817a4e6 Signed-off-by: Kees Cook Signed-off-by: Sami Tolvanen --- arch/x86/mm/extable.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c index 45f5d6cf65ae..79e99553d862 100644 --- a/arch/x86/mm/extable.c +++ b/arch/x86/mm/extable.c @@ -170,6 +170,7 @@ __visible bool ex_has_fault_handler(unsigned long ip) return handler == ex_handler_fault; } +__nocfi int fixup_exception(struct pt_regs *regs, int trapnr) { const struct exception_table_entry *e;