unwind_frame.c (98817a84ff1c755c347ac633ff017a623a631fad) unwind_frame.c (714acdbd1c94e7e3ab90f6b6938f1ccb27b662f0)
1// SPDX-License-Identifier: GPL-2.0-only
2#include <linux/sched.h>
3#include <linux/sched/task.h>
4#include <linux/sched/task_stack.h>
5#include <linux/interrupt.h>
6#include <asm/sections.h>
7#include <asm/ptrace.h>
8#include <asm/bitops.h>

--- 255 unchanged lines hidden (view full) ---

264 goto the_end;
265
266 if (is_last_task_frame(state)) {
267 regs = task_pt_regs(state->task);
268
269 /*
270 * kthreads (other than the boot CPU's idle thread) have some
271 * partial regs at the end of their stack which were placed
1// SPDX-License-Identifier: GPL-2.0-only
2#include <linux/sched.h>
3#include <linux/sched/task.h>
4#include <linux/sched/task_stack.h>
5#include <linux/interrupt.h>
6#include <asm/sections.h>
7#include <asm/ptrace.h>
8#include <asm/bitops.h>

--- 255 unchanged lines hidden (view full) ---

264 goto the_end;
265
266 if (is_last_task_frame(state)) {
267 regs = task_pt_regs(state->task);
268
269 /*
270 * kthreads (other than the boot CPU's idle thread) have some
271 * partial regs at the end of their stack which were placed
272 * there by copy_thread_tls(). But the regs don't have any
272 * there by copy_thread(). But the regs don't have any
273 * useful information, so we can skip them.
274 *
275 * This user_mode() check is slightly broader than a PF_KTHREAD
276 * check because it also catches the awkward situation where a
277 * newly forked kthread transitions into a user task by calling
278 * do_execve(), which eventually clears PF_KTHREAD.
279 */
280 if (!user_mode(regs))

--- 129 unchanged lines hidden ---
273 * useful information, so we can skip them.
274 *
275 * This user_mode() check is slightly broader than a PF_KTHREAD
276 * check because it also catches the awkward situation where a
277 * newly forked kthread transitions into a user task by calling
278 * do_execve(), which eventually clears PF_KTHREAD.
279 */
280 if (!user_mode(regs))

--- 129 unchanged lines hidden ---