xref: /linux/arch/arm64/mm/extable.c (revision b24413180f5600bcb3bb70fbed5cf186b60864bd)
1*b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0
21d18c47cSCatalin Marinas /*
31d18c47cSCatalin Marinas  * Based on arch/arm/mm/extable.c
41d18c47cSCatalin Marinas  */
51d18c47cSCatalin Marinas 
60edfa839SPaul Gortmaker #include <linux/extable.h>
71d18c47cSCatalin Marinas #include <linux/uaccess.h>
81d18c47cSCatalin Marinas 
91d18c47cSCatalin Marinas int fixup_exception(struct pt_regs *regs)
101d18c47cSCatalin Marinas {
111d18c47cSCatalin Marinas 	const struct exception_table_entry *fixup;
121d18c47cSCatalin Marinas 
131d18c47cSCatalin Marinas 	fixup = search_exception_tables(instruction_pointer(regs));
141d18c47cSCatalin Marinas 	if (fixup)
156c94f27aSArd Biesheuvel 		regs->pc = (unsigned long)&fixup->fixup + fixup->fixup;
161d18c47cSCatalin Marinas 
171d18c47cSCatalin Marinas 	return fixup != NULL;
181d18c47cSCatalin Marinas }
19