blob: c9f118cd812bb0e435e402281d1289227a2a8608 [file] [log] [blame]
Catalin Marinas1d18c472012-03-05 11:49:27 +00001/*
2 * Based on arch/arm/mm/extable.c
3 */
4
Paul Gortmaker0edfa832016-09-19 17:38:55 -04005#include <linux/extable.h>
Catalin Marinas1d18c472012-03-05 11:49:27 +00006#include <linux/uaccess.h>
7
8int fixup_exception(struct pt_regs *regs)
9{
10 const struct exception_table_entry *fixup;
11
12 fixup = search_exception_tables(instruction_pointer(regs));
13 if (fixup)
Ard Biesheuvel6c94f272016-01-01 15:02:12 +010014 regs->pc = (unsigned long)&fixup->fixup + fixup->fixup;
Catalin Marinas1d18c472012-03-05 11:49:27 +000015
16 return fixup != NULL;
17}