extable.c 379 B

12345678910111213141516171819
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Based on arch/arm/mm/extable.c
  4. */
  5. #include <linux/extable.h>
  6. #include <linux/uaccess.h>
  7. int fixup_exception(struct pt_regs *regs)
  8. {
  9. const struct exception_table_entry *fixup;
  10. fixup = search_exception_tables(instruction_pointer(regs));
  11. if (fixup)
  12. regs->pc = (unsigned long)&fixup->fixup + fixup->fixup;
  13. return fixup != NULL;
  14. }