Lines Matching +full:non +full:- +full:pc
1 // SPDX-License-Identifier: GPL-2.0-only
22 * The unwind will begin at the PC within the regs.
31 state->fp = regs->regs[29]; in unwind_init_from_regs()
32 state->pc = regs->pc; in unwind_init_from_regs()
47 state->fp = (unsigned long)__builtin_frame_address(1); in unwind_init_from_caller()
48 state->pc = (unsigned long)__builtin_return_address(0); in unwind_init_from_caller()
54 * The unwind will begin at the blocked tasks saved PC (i.e. the caller of
66 state->fp = thread_saved_fp(task); in unwind_init_from_task()
67 state->pc = thread_saved_pc(task); in unwind_init_from_task()
79 struct task_struct *tsk = state->task; in unwind_next()
80 unsigned long fp = state->fp; in unwind_next()
84 if (fp == (unsigned long)task_pt_regs(tsk)->stackframe) in unwind_next()
85 return -ENOENT; in unwind_next()
91 state->pc = ptrauth_strip_insn_pac(state->pc); in unwind_next()
94 if (tsk->ret_stack && in unwind_next()
95 (state->pc == (unsigned long)return_to_handler)) { in unwind_next()
103 orig_pc = ftrace_graph_ret_addr(tsk, NULL, state->pc, in unwind_next()
104 (void *)state->fp); in unwind_next()
105 if (WARN_ON_ONCE(state->pc == orig_pc)) in unwind_next()
106 return -EINVAL; in unwind_next()
107 state->pc = orig_pc; in unwind_next()
111 if (is_kretprobe_trampoline(state->pc)) in unwind_next()
112 state->pc = kretprobe_find_ret_addr(tsk, (void *)state->fp, &state->kr_cur); in unwind_next()
125 if (!consume_entry(cookie, state->pc)) in unwind()
168 * Per-cpu stacks are only accessible when unwinding the current task in a
169 * non-preemptible context.