/* * Helper called for bulk of exceptions NOT needing specific handling * -for user faults enqueues requested signal * -for kernel, chk if due to copy_(to|from)_user, otherwise die()
*/ static noinline int
unhandled_exception(constchar *str, struct pt_regs *regs, int signo, int si_code, void __user *addr)
{ if (user_mode(regs)) { struct task_struct *tsk = current;
/* * Entry Point for Misaligned Data access Exception, for emulating in software
*/ int do_misaligned_access(unsignedlong address, struct pt_regs *regs, struct callee_regs *cregs)
{ /* If emulation not enabled, or failed, kill the task */ if (misaligned_fixup(address, regs, cregs) != 0) return do_misaligned_error(address, regs);
return 0;
}
/* * Entry point for miscll errors such as Nested Exceptions * -Duplicate TLB entry is handled separately though
*/ void do_machine_check_fault(unsignedlong address, struct pt_regs *regs)
{
die("Unhandled Machine Check Exception", regs, address);
}
/* * Entry point for traps induced by ARCompact TRAP_S <n> insn * This is same family as TRAP0/SWI insn (use the same vector). * The only difference being SWI insn take no operand, while TRAP_S does * which reflects in ECR Reg as 8 bit param. * Thus TRAP_S <n> can be used for specific purpose * -1 used for software breakpointing (gdb) * -2 used by kprobes * -5 __builtin_trap() generated by gcc (2018.03 onwards) for toggle such as * -fno-isolate-erroneous-paths-dereference
*/ void do_non_swi_trap(unsignedlong address, struct pt_regs *regs)
{ switch (regs->ecr.param) { case 1:
trap_is_brkpt(address, regs); break;
case 2:
trap_is_kprobe(address, regs); break;
case 3: case 4:
kgdb_trap(regs); break;
case 5:
do_trap5_error(address, regs); break; default: break;
}
}
/* * Entry point for Instruction Error Exception * -For a corner case, ARC kprobes implementation resorts to using * this exception, hence the check
*/ void do_insterror_or_kprobe(unsignedlong address, struct pt_regs *regs)
{ int rc;
/* Check if this exception is caused by kprobes */
rc = notify_die(DIE_IERR, "kprobe_ierr", regs, address, 0, SIGILL); if (rc == NOTIFY_STOP) return;
insterror_is_error(address, regs);
}
/* * abort() call generated by older gcc for __builtin_trap()
*/ void abort(void)
{
__asm__ __volatile__("trap_s 5\n");
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet)
¤
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.