~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/extable.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ASM_X86_EXTABLE_H
  3 #define _ASM_X86_EXTABLE_H
  4 
  5 #include <asm/extable_fixup_types.h>
  6 
  7 /*
  8  * The exception table consists of two addresses relative to the
  9  * exception table entry itself and a type selector field.
 10  *
 11  * The first address is of an instruction that is allowed to fault, the
 12  * second is the target at which the program should continue.
 13  *
 14  * The type entry is used by fixup_exception() to select the handler to
 15  * deal with the fault caused by the instruction in the first field.
 16  *
 17  * All the routines below use bits of fixup code that are out of line
 18  * with the main instruction path.  This means when everything is well,
 19  * we don't even have to jump over them.  Further, they do not intrude
 20  * on our cache or tlb entries.
 21  */
 22 
 23 struct exception_table_entry {
 24         int insn, fixup, data;
 25 };
 26 struct pt_regs;
 27 
 28 #define ARCH_HAS_RELATIVE_EXTABLE
 29 
 30 #define swap_ex_entry_fixup(a, b, tmp, delta)                   \
 31         do {                                                    \
 32                 (a)->fixup = (b)->fixup + (delta);              \
 33                 (b)->fixup = (tmp).fixup - (delta);             \
 34                 (a)->data = (b)->data;                          \
 35                 (b)->data = (tmp).data;                         \
 36         } while (0)
 37 
 38 extern int fixup_exception(struct pt_regs *regs, int trapnr,
 39                            unsigned long error_code, unsigned long fault_addr);
 40 extern int fixup_bug(struct pt_regs *regs, int trapnr);
 41 extern int ex_get_fixup_type(unsigned long ip);
 42 extern void early_fixup_exception(struct pt_regs *regs, int trapnr);
 43 
 44 #ifdef CONFIG_X86_MCE
 45 extern void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr);
 46 #else
 47 static inline void __noreturn ex_handler_msr_mce(struct pt_regs *regs, bool wrmsr)
 48 {
 49         for (;;)
 50                 cpu_relax();
 51 }
 52 #endif
 53 
 54 #if defined(CONFIG_BPF_JIT) && defined(CONFIG_X86_64)
 55 bool ex_handler_bpf(const struct exception_table_entry *x, struct pt_regs *regs);
 56 #else
 57 static inline bool ex_handler_bpf(const struct exception_table_entry *x,
 58                                   struct pt_regs *regs) { return false; }
 59 #endif
 60 
 61 #endif
 62 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php