extable.c 302 B

12345678910111213141516
  1. #include <linux/module.h>
  2. #include <linux/uaccess.h>
  3. int fixup_exception(struct pt_regs *regs)
  4. {
  5. const struct exception_table_entry *fixup;
  6. unsigned long pc = instruction_pointer(regs);
  7. fixup = search_exception_tables(pc);
  8. if (fixup)
  9. regs->ctx.CurrPC = fixup->fixup;
  10. return fixup != NULL;
  11. }