aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/unwind.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/unwind.h')
-rw-r--r--arch/x86/include/asm/unwind.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/x86/include/asm/unwind.h b/arch/x86/include/asm/unwind.h
index e9cc6fe1fc6f..1f86e1b0a5cd 100644
--- a/arch/x86/include/asm/unwind.h
+++ b/arch/x86/include/asm/unwind.h
@@ -7,6 +7,9 @@
7#include <asm/ptrace.h> 7#include <asm/ptrace.h>
8#include <asm/stacktrace.h> 8#include <asm/stacktrace.h>
9 9
10#define IRET_FRAME_OFFSET (offsetof(struct pt_regs, ip))
11#define IRET_FRAME_SIZE (sizeof(struct pt_regs) - IRET_FRAME_OFFSET)
12
10struct unwind_state { 13struct unwind_state {
11 struct stack_info stack_info; 14 struct stack_info stack_info;
12 unsigned long stack_mask; 15 unsigned long stack_mask;
@@ -52,15 +55,28 @@ void unwind_start(struct unwind_state *state, struct task_struct *task,
52} 55}
53 56
54#if defined(CONFIG_UNWINDER_ORC) || defined(CONFIG_UNWINDER_FRAME_POINTER) 57#if defined(CONFIG_UNWINDER_ORC) || defined(CONFIG_UNWINDER_FRAME_POINTER)
55static inline struct pt_regs *unwind_get_entry_regs(struct unwind_state *state) 58/*
59 * If 'partial' returns true, only the iret frame registers are valid.
60 */
61static inline struct pt_regs *unwind_get_entry_regs(struct unwind_state *state,
62 bool *partial)
56{ 63{
57 if (unwind_done(state)) 64 if (unwind_done(state))
58 return NULL; 65 return NULL;
59 66
67 if (partial) {
68#ifdef CONFIG_UNWINDER_ORC
69 *partial = !state->full_regs;
70#else
71 *partial = false;
72#endif
73 }
74
60 return state->regs; 75 return state->regs;
61} 76}
62#else 77#else
63static inline struct pt_regs *unwind_get_entry_regs(struct unwind_state *state) 78static inline struct pt_regs *unwind_get_entry_regs(struct unwind_state *state,
79 bool *partial)
64{ 80{
65 return NULL; 81 return NULL;
66} 82}