Lines Matching +full:non +full:- +full:pc

1 // SPDX-License-Identifier: GPL-2.0-only
43 unwind_init_common(&state->common); in kunwind_init()
44 state->task = task; in kunwind_init()
50 * The unwind will begin at the PC within the regs.
60 state->common.fp = regs->regs[29]; in kunwind_init_from_regs()
61 state->common.pc = regs->pc; in kunwind_init_from_regs()
77 state->common.fp = (unsigned long)__builtin_frame_address(1); in kunwind_init_from_caller()
78 state->common.pc = (unsigned long)__builtin_return_address(0); in kunwind_init_from_caller()
84 * The unwind will begin at the blocked tasks saved PC (i.e. the caller of
97 state->common.fp = thread_saved_fp(task); in kunwind_init_from_task()
98 state->common.pc = thread_saved_pc(task); in kunwind_init_from_task()
105 if (state->task->ret_stack && in kunwind_recover_return_address()
106 (state->common.pc == (unsigned long)return_to_handler)) { in kunwind_recover_return_address()
108 orig_pc = ftrace_graph_ret_addr(state->task, NULL, in kunwind_recover_return_address()
109 state->common.pc, in kunwind_recover_return_address()
110 (void *)state->common.fp); in kunwind_recover_return_address()
111 if (WARN_ON_ONCE(state->common.pc == orig_pc)) in kunwind_recover_return_address()
112 return -EINVAL; in kunwind_recover_return_address()
113 state->common.pc = orig_pc; in kunwind_recover_return_address()
118 if (is_kretprobe_trampoline(state->common.pc)) { in kunwind_recover_return_address()
120 orig_pc = kretprobe_find_ret_addr(state->task, in kunwind_recover_return_address()
121 (void *)state->common.fp, in kunwind_recover_return_address()
122 &state->kr_cur); in kunwind_recover_return_address()
123 state->common.pc = orig_pc; in kunwind_recover_return_address()
140 struct task_struct *tsk = state->task; in kunwind_next()
141 unsigned long fp = state->common.fp; in kunwind_next()
145 if (fp == (unsigned long)task_pt_regs(tsk)->stackframe) in kunwind_next()
146 return -ENOENT; in kunwind_next()
148 err = unwind_next_frame_record(&state->common); in kunwind_next()
152 state->common.pc = ptrauth_strip_kernel_insn_pac(state->common.pc); in kunwind_next()
178 * Per-cpu stacks are only accessible when unwinding the current task in a
179 * non-preemptible context.
254 return data->consume_entry(data->cookie, state->common.pc); in arch_kunwind_consume_entry()