Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/trap.c
| Show First 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | if (!lower && test_bs_fault((void *)frame->tf_elr)) { | ||||
| return; | return; | ||||
| } | } | ||||
| print_registers(frame); | print_registers(frame); | ||||
| print_gp_register("far", far); | print_gp_register("far", far); | ||||
| panic("Unhandled EL%d external data abort", lower ? 0: 1); | panic("Unhandled EL%d external data abort", lower ? 0: 1); | ||||
| } | } | ||||
| static void | /* | ||||
| * It is unsafe to access the stack canary value stored in "td" until | |||||
| * kernel map translation faults are handled, see the pmap_klookup() call below. | |||||
| * Thus, stack-smashing detection with per-thread canaries must be disabled in | |||||
| * this function. | |||||
| */ | |||||
| static void NO_PERTHREAD_SSP | |||||
| data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, | data_abort(struct thread *td, struct trapframe *frame, uint64_t esr, | ||||
| uint64_t far, int lower) | uint64_t far, int lower) | ||||
| { | { | ||||
| struct vm_map *map; | struct vm_map *map; | ||||
| struct pcb *pcb; | struct pcb *pcb; | ||||
| vm_prot_t ftype; | vm_prot_t ftype; | ||||
| int error, sig, ucode; | int error, sig, ucode; | ||||
| #ifdef KDB | #ifdef KDB | ||||
| ▲ Show 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | else if ((exception & ISS_FP_UFF) != 0) | ||||
| code = FPE_FLTUND; | code = FPE_FLTUND; | ||||
| else if ((exception & ISS_FP_IXF) != 0) | else if ((exception & ISS_FP_IXF) != 0) | ||||
| code = FPE_FLTRES; | code = FPE_FLTRES; | ||||
| } | } | ||||
| call_trapsignal(td, SIGFPE, code, addr, exception); | call_trapsignal(td, SIGFPE, code, addr, exception); | ||||
| } | } | ||||
| #endif | #endif | ||||
| void | /* | ||||
| * See the comment above data_abort(). | |||||
| */ | |||||
| void NO_PERTHREAD_SSP | |||||
| do_el1h_sync(struct thread *td, struct trapframe *frame) | do_el1h_sync(struct thread *td, struct trapframe *frame) | ||||
| { | { | ||||
| uint32_t exception; | uint32_t exception; | ||||
| uint64_t esr, far; | uint64_t esr, far; | ||||
| int dfsc; | int dfsc; | ||||
| kasan_mark(frame, sizeof(*frame), sizeof(*frame), 0); | kasan_mark(frame, sizeof(*frame), sizeof(*frame), 0); | ||||
| ▲ Show 20 Lines • Show All 286 Lines • Show Last 20 Lines | |||||