blob: 81e694af5f8c26736df04b183382d02501811a81 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Based on arch/arm/mm/extable.c
4 */
5
6#include <linux/extable.h>
7#include <linux/uaccess.h>
8
9int fixup_exception(struct pt_regs *regs)
10{
11 const struct exception_table_entry *fixup;
12
13 fixup = search_exception_tables(instruction_pointer(regs));
14 if (fixup)
15 regs->pc = (unsigned long)&fixup->fixup + fixup->fixup;
16
17 return fixup != NULL;
18}