| /xnu-11215/bsd/net/ |
| H A D | bpf_filter.c | 450 --pc; in bpf_filter() 452 ++pc; in bpf_filter() 657 pc += pc->k; in bpf_filter() 661 pc += (A > pc->k) ? pc->jt : pc->jf; in bpf_filter() 665 pc += (A >= pc->k) ? pc->jt : pc->jf; in bpf_filter() 669 pc += (A == pc->k) ? pc->jt : pc->jf; in bpf_filter() 673 pc += (A & pc->k) ? pc->jt : pc->jf; in bpf_filter() 677 pc += (A > X) ? pc->jt : pc->jf; in bpf_filter() 681 pc += (A >= X) ? pc->jt : pc->jf; in bpf_filter() 685 pc += (A == X) ? pc->jt : pc->jf; in bpf_filter() [all …]
|
| /xnu-11215/bsd/dev/arm64/ |
| H A D | dtrace_isa.c | 198 while (pc != 0) { in dtrace_getustack_common() 230 user_addr_t pc, sp, fp; in dtrace_getupcstack() local 269 *pcstack++ = (uint64_t) pc; in dtrace_getupcstack() 297 user_addr_t pc, sp, fp; in dtrace_getustackdepth() local 340 user_addr_t pc, sp; in dtrace_getufpstack() local 395 pc = dtrace_fuword64(sp); in dtrace_getufpstack() 397 pc = dtrace_fuword32(sp); in dtrace_getufpstack() 475 uintptr_t pc; in dtrace_getpcstack() local 486 pc = fp->retaddr; in dtrace_getpcstack() 570 uintptr_t pc; in dtrace_getarg() local [all …]
|
| H A D | fasttrap_isa.c | 384 *pc_out = pc; 390 *pc_out = pc; 403 uthread->t_dtrace_pc = pc; 518 *pc_out = regs64->pc + 4; 550 *pc_out = regs64->pc + 4; 605 new_pc = regs64->pc + 4; 700 new_pc = regs64->pc + 4; 708 new_pc = regs64->pc + 4; 751 new_pc = regs64->pc + 4; 897 new_pc = regs64->pc + 4; [all …]
|
| H A D | dtrace_subr_arm.c | 62 uint32_t pc; in dtrace_user_probe() local 63 if (copyin((user_addr_t)saved_state64(regs)->pc, &pc, sizeof(uint32_t))) { in dtrace_user_probe() 66 is_fasttrap = (pc == FASTTRAP_ARM64_RET_INSTR); in dtrace_user_probe() 165 if (fuword32(saved_state64(regs)->pc, &instr) == 0 && instr != FASTTRAP_ARM64_INSTR) { in dtrace_user_probe()
|
| H A D | sdt_arm.c | 75 uintptr_t pc; in sdt_getarg() local 88 pc = (uintptr_t)ptrauth_strip((void*)fp->retaddr, ptrauth_key_return_address); in sdt_getarg() 90 pc = fp->retaddr; in sdt_getarg() 94 && pc > (uintptr_t)dtrace_invop_callsite_pre in sdt_getarg() 95 && pc <= (uintptr_t)dtrace_invop_callsite_post) { in sdt_getarg()
|
| /xnu-11215/bsd/dev/i386/ |
| H A D | dtrace_isa.c | 464 while (pc != 0) { in dtrace_getustack_common() 531 ASSERT(pc != NULL); in dtrace_adjust_stack() 592 user_addr_t pc, sp, fp; in dtrace_getupcstack() local 626 pc = regs->ss_32.eip; in dtrace_getupcstack() 684 pc = regs->ss_32.eip; in dtrace_getustackdepth() 717 user_addr_t pc, sp; in dtrace_getufpstack() local 748 pc = regs->ss_32.eip; in dtrace_getufpstack() 772 while (pc != 0) { in dtrace_getufpstack() 834 uintptr_t pc; in dtrace_getpcstack() local 912 uintptr_t pc; in dtrace_getarg() local [all …]
|
| H A D | fasttrap_isa.c | 1018 regs32->eip = pc; in fasttrap_pid_probe32() 1160 new_pc = pc; in fasttrap_pid_probe32() 1290 new_pc = pc; in fasttrap_pid_probe32() 1355 new_pc = pc; in fasttrap_pid_probe32() 1413 new_pc = pc; in fasttrap_pid_probe32() 1442 new_pc = pc; in fasttrap_pid_probe32() 1706 new_pc = pc; in fasttrap_pid_probe64() 1836 new_pc = pc; in fasttrap_pid_probe64() 1899 new_pc = pc; in fasttrap_pid_probe64() 2001 new_pc = pc; in fasttrap_pid_probe64() [all …]
|
| H A D | sdt_x86.c | 74 uintptr_t pc; in sdt_getarg() local 85 pc = fp->retaddr; in sdt_getarg() 88 && pc > (uintptr_t)dtrace_invop_callsite_pre in sdt_getarg() 89 && pc <= (uintptr_t)dtrace_invop_callsite_post) { in sdt_getarg()
|
| H A D | dtrace_subr_x86.c | 185 user_addr_t pc = (regs64) ? regs64->isf.rip : (user_addr_t)regs32->eip; in dtrace_user_probe() local 186 if (fuword8(pc - 1, &instr) == 0 && instr != FASTTRAP_INSTR && // neither single-byte INT3 (0xCC) in dtrace_user_probe() 187 … !(instr == 3 && fuword8(pc - 2, &instr2) == 0 && instr2 == 0xCD)) { // nor two-byte INT 3 (0xCD03) in dtrace_user_probe()
|
| /xnu-11215/bsd/kern/ |
| H A D | qsort.c | 127 char *pa, *pb, *pc, *pd, *pl, *pm, *pn; in qsort() local 157 pc = pd = (char *)a + (n - 1) * es; in qsort() 159 while (pb <= pc && (r = cmp(pb, a)) <= 0) { in qsort() 167 while (pb <= pc && (r = cmp(pc, a)) >= 0) { in qsort() 170 swap(pc, pd); in qsort() 173 pc -= es; in qsort() 175 if (pb > pc) { in qsort() 178 swap(pb, pc); in qsort() 181 pc -= es; in qsort() 196 r = min(pd - pc, pn - pd - es); in qsort() [all …]
|
| /xnu-11215/osfmk/kern/ |
| H A D | backtrace.c | 149 uintptr_t pc = ret_addr; in backtrace_internal() local 151 pc += addr_offset; in backtrace_internal() 153 btsize - size_used, pc); in backtrace_internal() 217 *pc = saved_state32(state)->eip; in interrupted_kernel_pc_fp() 251 uintptr_t pc = 0; in _backtrace_preamble() local 266 return pc; in _backtrace_preamble() 276 if (pc) { in backtrace() 277 bt[0] = pc; in backtrace() 307 if (pc) { in backtrace_packed() 383 uintptr_t pc = 0, next_fp = 0; in backtrace_user() local [all …]
|
| H A D | restartable.c | 186 _ranges_lookup(struct restartable_ranges *rr, mach_vm_address_t pc) in _ranges_lookup() argument 191 if (pc <= ranges[0].location) { in _ranges_lookup() 194 if (pc >= ranges[r - 1].location + ranges[r - 1].length) { in _ranges_lookup() 202 if (pc <= location) { in _ranges_lookup() 205 } else if (location + ranges[i].length <= pc) { in _ranges_lookup() 500 mach_vm_address_t pc; in thread_reset_pcs_ast() local 508 pc = _ranges_lookup(rr, machine_thread_pc(thread)); in thread_reset_pcs_ast() 510 if (pc) { in thread_reset_pcs_ast() 511 machine_thread_reset_pc(thread, pc); in thread_reset_pcs_ast()
|
| /xnu-11215/osfmk/mach/arm/ |
| H A D | thread_status.h | 572 … (register_t)(is_saved_state32(iss) ? const_saved_state32(iss)->pc : const_saved_state64(iss)->pc); in get_saved_state_pc() 580 uint64_t pc = saved_state32(iss)->pc + (uint32_t)diff; in add_saved_state_pc() local 581 saved_state32(iss)->pc = CAST_ASSERT_SAFE(uint32_t, pc); in add_saved_state_pc() 601 uint64_t pc = saved_state32(iss)->pc + (uint32_t)diff; in add_user_saved_state_pc() local 602 saved_state32(iss)->pc = CAST_ASSERT_SAFE(uint32_t, pc); in add_user_saved_state_pc() 622 saved_state32(iss)->pc = CAST_ASSERT_SAFE(uint32_t, pc); in set_saved_state_pc() 628 [pc] "r"(pc) in set_saved_state_pc() 631 saved_state64(iss)->pc = (unsigned long)pc; in set_saved_state_pc() 641 saved_state32(iss)->pc = CAST_ASSERT_SAFE(uint32_t, pc); in set_user_saved_state_pc() 647 [pc] "r"(pc) in set_user_saved_state_pc() [all …]
|
| /xnu-11215/osfmk/i386/ |
| H A D | locks_i386.c | 130 #define OBTAIN_PC(pc) ((pc) = GET_RETURN_PC()) argument 131 #define DECL_PC(pc) pc_t pc; argument 138 #define OBTAIN_PC(pc) ++pc argument 508 DECL_PC(pc); 510 OBTAIN_PC(pc); 536 DECL_PC(pc); in usimple_lock_nopreempt() 538 OBTAIN_PC(pc); in usimple_lock_nopreempt() 565 DECL_PC(pc); in usimple_unlock() 586 DECL_PC(pc); in usimple_unlock_nopreempt() 614 DECL_PC(pc); in usimple_lock_try() [all …]
|
| /xnu-11215/tests/ |
| H A D | user_msrs.c | 194 void (*pc)(void); in sig_caught() local 203 pc = (void (*)(void))__darwin_arm_thread_state64_get_pc(ctx->__ss); in sig_caught() 204 instr = *(uint32_t*)pc; in sig_caught() 207 …IL("We did not expect SIGILL on an instr that is not an MSR/MRS. [%p] = 0x%08x", (void*)pc, instr); in sig_caught() 210 pc = (void (*)(void))(((uintptr_t)pc) + 4); in sig_caught() 211 pc = ptrauth_sign_unauthenticated(pc, ptrauth_key_function_pointer, 0); in sig_caught() 216 __darwin_arm_thread_state64_set_pc_fptr(ctx->__ss, pc); in sig_caught()
|
| /xnu-11215/osfmk/arm/ |
| H A D | asm.h | 174 # define RET mov pc, lr 175 # define RETeq moveq pc, lr 176 # define RETne movne pc, lr 178 # define RETc(c) mov##c pc, lr 180 # define RETc(c) mov/**/c pc, lr 186 # define BRANCH_EXTERN(x) ldr pc, [pc, #-4] ; \ 240 ldr reg, [pc, reg] 258 ldmfd sp!, { pc }
|
| H A D | rtclock.c | 329 uintptr_t pc; in rtclock_intr() local 352 pc = get_saved_state_pc(regs); in rtclock_intr() 358 pc = 0; in rtclock_intr() 365 user_mode ? pc : VM_KERNEL_UNSLIDE(pc), user_mode); in rtclock_intr() 369 timer_intr(user_mode, pc); in rtclock_intr()
|
| H A D | status_shared.c | 48 ts32->pc = (uint32_t)get_saved_state_pc(saved_state); in saved_state_to_thread_state32() 67 set_user_saved_state_pc(saved_state, ts32->pc); in thread_state32_to_saved_state()
|
| /xnu-11215/osfmk/kperf/ |
| H A D | callstack.c | 664 pc = 0ULL; in chudxnu_thread_get_callstack64_internal() 682 pc = 0ULL; in chudxnu_thread_get_callstack64_internal() 707 pc = 0ULL; in chudxnu_thread_get_callstack64_internal() 730 pc = 0ULL; in chudxnu_thread_get_callstack64_internal() 737 pc = 0ULL; in chudxnu_thread_get_callstack64_internal() 743 prevPC = pc; in chudxnu_thread_get_callstack64_internal() 817 pc = 0ULL; in chudxnu_thread_get_callstack64_internal() 835 pc = 0ULL; in chudxnu_thread_get_callstack64_internal() 851 pc = 0ULL; in chudxnu_thread_get_callstack64_internal() 865 pc = 0ULL; in chudxnu_thread_get_callstack64_internal() [all …]
|
| /xnu-11215/tests/ipc/ |
| H A D | kernel_signed_pac_thread_state.c | 247 void *pc = (void*)(arm_thread_state64_get_pc(*state) + 4); in catch_mach_exception_raise_state_identity() local 250 T_LOG("pc for thread state is 0x%p\n", pc); in catch_mach_exception_raise_state_identity() 253 pc = ptrauth_sign_unauthenticated(pc, ptrauth_key_function_pointer, 0); in catch_mach_exception_raise_state_identity() 254 arm_thread_state64_set_pc_fptr(*state, pc); in catch_mach_exception_raise_state_identity() 282 arm_thread_state64_set_pc_fptr(*state, pc); in catch_mach_exception_raise_state_identity()
|
| /xnu-11215/osfmk/x86_64/ |
| H A D | kpc_x86.c | 623 uintptr_t pc = 0; in get_interrupted_pc() local 625 pc = saved_state64(state)->isf.rip; in get_interrupted_pc() 627 pc = saved_state32(state)->eip; in get_interrupted_pc() 630 pc = VM_KERNEL_UNSLIDE(pc); in get_interrupted_pc() 632 return pc; in get_interrupted_pc() 640 uintptr_t pc = get_interrupted_pc(&kernel); in kpc_sample_kperf_x86() local 649 config & 0xffff /* just the number and umask */, count, pc, flags); in kpc_sample_kperf_x86()
|
| /xnu-11215/san/coverage/ |
| H A D | kcov_ksancov.c | 216 trace_pc_guard_pcs(struct ksancov_dev *dev, uintptr_t pc) in trace_pc_guard_pcs() argument 228 entries[idx] = pc; in trace_pc_guard_pcs() 233 trace_pc_guard_pcs_stk(struct ksancov_dev *dev, uintptr_t pc, uint32_t stksize) in trace_pc_guard_pcs_stk() argument 246 .pc = pc, in trace_pc_guard_pcs_stk() 295 uintptr_t pc = (uintptr_t)(VM_KERNEL_UNSLIDE(caller) - 1); in kcov_ksancov_trace_guard() local 301 ksancov_edgemap->ke_addrs[idx] = pc; in kcov_ksancov_trace_guard() 311 uintptr_t pc = (uintptr_t)(VM_KERNEL_UNSLIDE(caller) - 1); in kcov_ksancov_trace_pc() local 329 trace_pc_guard_pcs(dev, pc); in kcov_ksancov_trace_pc() 333 trace_pc_guard_pcs_stk(dev, pc, data->ktd_stksz.kst_stksz); in kcov_ksancov_trace_pc() 376 uintptr_t pc = start[0]; in kcov_ksancov_pcs_init() local [all …]
|
| /xnu-11215/osfmk/kdp/ml/arm/ |
| H A D | kdp_machdep.c | 364 saved_state64(saved_state)->pc += 4; in kdp_trap() 413 vm_offset_t pc = 0; in machine_trace_thread64() local 431 pc = state->ss_64.pc; in machine_trace_thread64() 439 …pc = kstate->pc_was_in_userspace ? (register_t)ptrauth_strip((void *)&_was_in_userspace, ptrauth_k… in machine_trace_thread64() 446 if (!prevlr && !fp && !sp && !pc) { in machine_trace_thread64()
|
| /xnu-11215/osfmk/arm64/ |
| H A D | status.c | 102 ts64->pc = get_saved_state_pc(saved_state); in saved_state_to_thread_state64() 432 if (ts64->pc) { in machine_thread_state_convert_to_user() 439 ts64->pc = (uintptr_t)pmap_sign_user_ptr((void*)ts64->pc, in machine_thread_state_convert_to_user() 505 … ts64->pc != old_ts64->pc) || (!(ts64->flags & __DARWIN_ARM_THREAD_STATE64_FLAGS_IB_SIGNED_LR) && in machine_thread_state_check_pac_state() 620 uint64_t new_pc = ts64->pc; in machine_thread_state_convert_from_user() 624 ts64->pc = new_pc; in machine_thread_state_convert_from_user() 695 ts64->pc = old_ts64->pc; in machine_thread_state_convert_from_user() 733 if (ts64->pc) { in machine_thread_state_convert_from_user() 739 ts64->pc = (uintptr_t)pmap_auth_user_ptr((void*)ts64->pc, in machine_thread_state_convert_from_user() 2051 if (state->pc) { in thread_entrypoint() [all …]
|
| /xnu-11215/san/tools/ |
| H A D | kstksz | 22 pc = nil, 33 self.pc, self.stack_size)) 118 event.pc = trace_point[1]
|