dumpstack_64.c (fba961ab29e5ffb055592442808bb0f7962e05da) dumpstack_64.c (4fe2d8b11a370af286287a2661de9d4e6c9a145a)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
5 */
6#include <linux/sched/debug.h>
7#include <linux/kallsyms.h>
8#include <linux/kprobes.h>

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

32
33const char *stack_type_name(enum stack_type type)
34{
35 BUILD_BUG_ON(N_EXCEPTION_STACKS != 4);
36
37 if (type == STACK_TYPE_IRQ)
38 return "IRQ";
39
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs
5 */
6#include <linux/sched/debug.h>
7#include <linux/kallsyms.h>
8#include <linux/kprobes.h>

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

32
33const char *stack_type_name(enum stack_type type)
34{
35 BUILD_BUG_ON(N_EXCEPTION_STACKS != 4);
36
37 if (type == STACK_TYPE_IRQ)
38 return "IRQ";
39
40 if (type == STACK_TYPE_SYSENTER)
41 return "SYSENTER";
40 if (type == STACK_TYPE_ENTRY) {
41 /*
42 * On 64-bit, we have a generic entry stack that we
43 * use for all the kernel entry points, including
44 * SYSENTER.
45 */
46 return "ENTRY_TRAMPOLINE";
47 }
42
43 if (type >= STACK_TYPE_EXCEPTION && type <= STACK_TYPE_EXCEPTION_LAST)
44 return exception_stack_names[type - STACK_TYPE_EXCEPTION];
45
46 return NULL;
47}
48
49static bool in_exception_stack(unsigned long *stack, struct stack_info *info)

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

113 goto unknown;
114
115 if (in_exception_stack(stack, info))
116 goto recursion_check;
117
118 if (in_irq_stack(stack, info))
119 goto recursion_check;
120
48
49 if (type >= STACK_TYPE_EXCEPTION && type <= STACK_TYPE_EXCEPTION_LAST)
50 return exception_stack_names[type - STACK_TYPE_EXCEPTION];
51
52 return NULL;
53}
54
55static bool in_exception_stack(unsigned long *stack, struct stack_info *info)

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

119 goto unknown;
120
121 if (in_exception_stack(stack, info))
122 goto recursion_check;
123
124 if (in_irq_stack(stack, info))
125 goto recursion_check;
126
121 if (in_sysenter_stack(stack, info))
127 if (in_entry_stack(stack, info))
122 goto recursion_check;
123
124 goto unknown;
125
126recursion_check:
127 /*
128 * Make sure we don't iterate through any given stack more than once.
129 * If it comes up a second time then there's something wrong going on:

--- 58 unchanged lines hidden ---
128 goto recursion_check;
129
130 goto unknown;
131
132recursion_check:
133 /*
134 * Make sure we don't iterate through any given stack more than once.
135 * If it comes up a second time then there's something wrong going on:

--- 58 unchanged lines hidden ---