1 // SPDX-License-Identifier: GPL-2.0
3 * Based on arch/arm/mm/extable.c
6 #include <linux/extable.h>
7 #include <linux/uaccess.h>
9 int fixup_exception(struct pt_regs *regs)
11 const struct exception_table_entry *fixup;
14 addr = instruction_pointer(regs);
16 /* Search the BPF tables first, these are formatted differently */
17 fixup = search_bpf_extables(addr);
19 return arm64_bpf_fixup_exception(fixup, regs);
21 fixup = search_exception_tables(addr);
25 regs->pc = (unsigned long)&fixup->fixup + fixup->fixup;