0001
0002 #ifndef __ASM_EXTABLE_H
0003 #define __ASM_EXTABLE_H
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 struct exception_table_entry
0019 {
0020 int insn, fixup;
0021 short type, data;
0022 };
0023
0024 #define ARCH_HAS_RELATIVE_EXTABLE
0025
0026 #define swap_ex_entry_fixup(a, b, tmp, delta) \
0027 do { \
0028 (a)->fixup = (b)->fixup + (delta); \
0029 (b)->fixup = (tmp).fixup - (delta); \
0030 (a)->type = (b)->type; \
0031 (b)->type = (tmp).type; \
0032 (a)->data = (b)->data; \
0033 (b)->data = (tmp).data; \
0034 } while (0)
0035
0036 #ifdef CONFIG_BPF_JIT
0037 bool ex_handler_bpf(const struct exception_table_entry *ex,
0038 struct pt_regs *regs);
0039 #else
0040 static inline
0041 bool ex_handler_bpf(const struct exception_table_entry *ex,
0042 struct pt_regs *regs)
0043 {
0044 return false;
0045 }
0046 #endif
0047
0048 bool fixup_exception(struct pt_regs *regs);
0049 #endif