Lines Matching full:frame
22 * AArch64 PCS assigns the frame pointer to x29.
36 void start_backtrace(struct stackframe *frame, unsigned long fp, in start_backtrace() argument
39 frame->fp = fp; in start_backtrace()
40 frame->pc = pc; in start_backtrace()
42 frame->graph = 0; in start_backtrace()
54 bitmap_zero(frame->stacks_done, __NR_STACK_TYPES); in start_backtrace()
55 frame->prev_fp = 0; in start_backtrace()
56 frame->prev_type = STACK_TYPE_UNKNOWN; in start_backtrace()
60 * Unwind from one frame record (A) to the next frame record (B).
62 * We terminate early if the location of B indicates a malformed chain of frame
66 int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame) in unwind_frame() argument
68 unsigned long fp = frame->fp; in unwind_frame()
74 /* Final frame; nothing to unwind */ in unwind_frame()
84 if (test_bit(info.type, frame->stacks_done)) in unwind_frame()
100 if (info.type == frame->prev_type) { in unwind_frame()
101 if (fp <= frame->prev_fp) in unwind_frame()
104 set_bit(frame->prev_type, frame->stacks_done); in unwind_frame()
108 * Record this frame record's values and location. The prev_fp and in unwind_frame()
111 frame->fp = READ_ONCE_NOCHECK(*(unsigned long *)(fp)); in unwind_frame()
112 frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp + 8)); in unwind_frame()
113 frame->prev_fp = fp; in unwind_frame()
114 frame->prev_type = info.type; in unwind_frame()
118 (ptrauth_strip_insn_pac(frame->pc) == (unsigned long)return_to_handler)) { in unwind_frame()
122 * modified a return address (LR) in a stack frame in unwind_frame()
126 ret_stack = ftrace_graph_get_ret_stack(tsk, frame->graph++); in unwind_frame()
129 frame->pc = ret_stack->ret; in unwind_frame()
133 frame->pc = ptrauth_strip_insn_pac(frame->pc); in unwind_frame()
139 void notrace walk_stackframe(struct task_struct *tsk, struct stackframe *frame, in walk_stackframe() argument
145 if (!fn(data, frame->pc)) in walk_stackframe()
147 ret = unwind_frame(tsk, frame); in walk_stackframe()
162 struct stackframe frame; in dump_backtrace() local
180 start_backtrace(&frame, in dump_backtrace()
187 start_backtrace(&frame, in dump_backtrace()
194 /* skip until specified stack frame */ in dump_backtrace()
196 dump_backtrace_entry(frame.pc, loglvl); in dump_backtrace()
197 } else if (frame.fp == regs->regs[29]) { in dump_backtrace()
202 * stack frame does not contain the corresponding pc in dump_backtrace()
208 } while (!unwind_frame(tsk, &frame)); in dump_backtrace()
225 struct stackframe frame; in arch_stack_walk() local
228 start_backtrace(&frame, regs->regs[29], regs->pc); in arch_stack_walk()
230 start_backtrace(&frame, in arch_stack_walk()
234 start_backtrace(&frame, thread_saved_fp(task), in arch_stack_walk()
237 walk_stackframe(task, &frame, consume_entry, cookie); in arch_stack_walk()