hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/x86/include/asm/stacktrace.h
....@@ -9,6 +9,8 @@
99
1010 #include <linux/uaccess.h>
1111 #include <linux/ptrace.h>
12
+
13
+#include <asm/cpu_entry_area.h>
1214 #include <asm/switch_to.h>
1315
1416 enum stack_type {
....@@ -33,6 +35,8 @@
3335
3436 int get_stack_info(unsigned long *stack, struct task_struct *task,
3537 struct stack_info *info, unsigned long *visit_mask);
38
+bool get_stack_info_noinstr(unsigned long *stack, struct task_struct *task,
39
+ struct stack_info *info);
3640
3741 const char *stack_type_name(enum stack_type type);
3842
....@@ -76,7 +80,7 @@
7680 get_stack_pointer(struct task_struct *task, struct pt_regs *regs)
7781 {
7882 if (regs)
79
- return (unsigned long *)kernel_stack_pointer(regs);
83
+ return (unsigned long *)regs->sp;
8084
8185 if (task == current)
8286 return __builtin_frame_address(0);
....@@ -85,7 +89,7 @@
8589 }
8690
8791 void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
88
- unsigned long *stack, char *log_lvl);
92
+ unsigned long *stack, const char *log_lvl);
8993
9094 /* The form of the top of the frame on the stack */
9195 struct stack_frame {
....@@ -97,19 +101,6 @@
97101 u32 next_frame;
98102 u32 return_address;
99103 };
100
-
101
-static inline unsigned long caller_frame_pointer(void)
102
-{
103
- struct stack_frame *frame;
104
-
105
- frame = __builtin_frame_address(0);
106
-
107
-#ifdef CONFIG_FRAME_POINTER
108
- frame = frame->next_frame;
109
-#endif
110
-
111
- return (unsigned long)frame;
112
-}
113104
114105 void show_opcodes(struct pt_regs *regs, const char *loglvl);
115106 void show_ip(struct pt_regs *regs, const char *loglvl);