int bug_brk_handler(struct pt_regs *regs, unsignedlong esr); int cfi_brk_handler(struct pt_regs *regs, unsignedlong esr); int reserved_fault_brk_handler(struct pt_regs *regs, unsignedlong esr); int kasan_brk_handler(struct pt_regs *regs, unsignedlong esr); int ubsan_brk_handler(struct pt_regs *regs, unsignedlong esr);
int early_brk64(unsignedlong addr, unsignedlong esr, struct pt_regs *regs);
/* * Move regs->pc to next instruction and do necessary setup before it * is executed.
*/ void arm64_skip_faulting_instruction(struct pt_regs *regs, unsignedlong size);
/* * CPUs with the RAS extensions have an Implementation-Defined-Syndrome bit * to indicate whether this ESR has a RAS encoding. CPUs without this feature * have a ISS-Valid bit in the same position. * If this bit is set, we know its not a RAS SError. * If its clear, we need to know if the CPU supports RAS. Uncategorized RAS * errors share the same encoding as an all-zeros encoding from a CPU that * doesn't support RAS.
*/ staticinlinebool arm64_is_ras_serror(unsignedlong esr)
{
WARN_ON(preemptible());
if (esr & ESR_ELx_IDS) returnfalse;
if (this_cpu_has_cap(ARM64_HAS_RAS_EXTN)) returntrue; else returnfalse;
}
/* * Return the AET bits from a RAS SError's ESR. * * It is implementation defined whether Uncategorized errors are containable. * We treat them as Uncontainable. * Non-RAS SError's are reported as Uncontained/Uncategorized.
*/ staticinlineunsignedlong arm64_ras_serror_get_severity(unsignedlong esr)
{ unsignedlong aet = esr & ESR_ELx_AET;
if (!arm64_is_ras_serror(esr)) { /* Not a RAS error, we can't interpret the ESR. */ return ESR_ELx_AET_UC;
}
/* * AET is RES0 if 'the value returned in the DFSC field is not * [ESR_ELx_FSC_SERROR]'
*/ if ((esr & ESR_ELx_FSC) != ESR_ELx_FSC_SERROR) { /* No severity information : Uncategorized */ return ESR_ELx_AET_UC;
}
/* * Put the registers back in the original format suitable for a * prologue instruction, using the generic return routine from the * Arm ARM (DDI 0487I.a) rules CNTMJ and MWFQH.
*/ if (esr & ESR_ELx_MOPS_ISS_MEM_INST) { /* SET* instruction */ if (option_a ^ wrong_option) { /* Format is from Option A; forward set */
regs->regs[dstreg] = dst + size;
regs->regs[sizereg] = -size;
}
} else { /* CPY* instruction */ unsignedlong src = regs->regs[srcreg]; if (!(option_a ^ wrong_option)) { /* Format is from Option B */ if (regs->pstate & PSR_N_BIT) { /* Backward copy */
regs->regs[dstreg] = dst - size;
regs->regs[srcreg] = src - size;
}
} else { /* Format is from Option A */ if (size & BIT(63)) { /* Forward copy */
regs->regs[dstreg] = dst + size;
regs->regs[srcreg] = src + size;
regs->regs[sizereg] = -size;
}
}
}
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.