/* * The exception table consists of three addresses: * * - A relative address to the instruction that is allowed to fault. * - A relative address at which the program should continue (fixup routine) * - An asm statement which specifies which CPU register will * receive -EFAULT when an exception happens if the lowest bit in * the fixup address is set. * * Note: The register specified in the err_opcode instruction will be * modified at runtime if a fault happens. Register %r0 will be ignored. * * Since relative addresses are used, 32bit values are sufficient even on * 64bit kernel.
*/
struct pt_regs; int fixup_exception(struct pt_regs *regs);
#define ARCH_HAS_RELATIVE_EXTABLE struct exception_table_entry { int insn; /* relative address of insn that is allowed to fault. */ int fixup; /* relative address of fixup routine */ int err_opcode; /* sample opcode with register which holds error code */
};
/* * ASM_EXCEPTIONTABLE_ENTRY_EFAULT() creates a special exception table entry * (with lowest bit set) for which the fault handler in fixup_exception() will * load -EFAULT on fault into the register specified by the err_opcode instruction, * and zeroes the target register in case of a read fault in get_user().
*/ #define ASM_EXCEPTIONTABLE_VAR(__err_var) \ int __err_var = 0 #define ASM_EXCEPTIONTABLE_ENTRY_EFAULT( fault_addr, except_addr, register )\
ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr + 1, "or %%r0,%%r0,"register)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.