Lines Matching refs:frame

16  * Unwind the current stack frame and store the new register values in the
47 static int frame_pointer_check(struct stackframe *frame)
50 unsigned long fp = frame->fp;
51 unsigned long pc = frame->pc;
63 low = frame->sp;
66 /* check current frame pointer is within bounds */
78 int notrace unwind_frame(struct stackframe *frame)
80 unsigned long fp = frame->fp;
82 if (frame_pointer_check(frame))
89 if (frame->ex_frame) {
90 struct pt_regs *regs = (struct pt_regs *)frame->sp;
96 * when frame->ex_frame is a false positive.
98 if ((unsigned long)&regs[1] > ALIGN(frame->sp, THREAD_SIZE))
101 frame->pc = regs->ARM_pc;
102 frame->ex_frame = false;
106 /* restore the registers from the stack frame */
108 frame->sp = frame->fp;
109 frame->fp = READ_ONCE_NOCHECK(*(unsigned long *)(fp));
110 frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp + 4));
112 frame->fp = READ_ONCE_NOCHECK(*(unsigned long *)(fp - 12));
113 frame->sp = READ_ONCE_NOCHECK(*(unsigned long *)(fp - 8));
114 frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp - 4));
117 if (is_kretprobe_trampoline(frame->pc))
118 frame->pc = kretprobe_find_ret_addr(frame->tsk,
119 (void *)frame->fp, &frame->kr_cur);
122 if (in_entry_text(frame->pc))
123 frame->ex_frame = true;
129 void notrace walk_stackframe(struct stackframe *frame,
135 if (!fn(data, frame->pc))
137 ret = unwind_frame(frame);
145 static void start_stack_trace(struct stackframe *frame, struct task_struct *task,
149 frame->fp = fp;
150 frame->sp = sp;
151 frame->lr = lr;
152 frame->pc = pc;
154 frame->kr_cur = NULL;
155 frame->tsk = task;
158 frame->ex_frame = in_entry_text(frame->pc);
165 struct stackframe frame;
168 start_stack_trace(&frame, NULL, regs->ARM_fp, regs->ARM_sp,
179 start_stack_trace(&frame, task, thread_saved_fp(task),
185 start_stack_trace(&frame, task,
191 if (unwind_frame(&frame))
195 walk_stackframe(&frame, consume_entry, cookie);