diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-i386/unwind.h | 12 | ||||
-rw-r--r-- | include/asm-x86_64/unwind.h | 8 |
2 files changed, 6 insertions, 14 deletions
diff --git a/include/asm-i386/unwind.h b/include/asm-i386/unwind.h index 601fc67bd775..aa2c931e30db 100644 --- a/include/asm-i386/unwind.h +++ b/include/asm-i386/unwind.h | |||
@@ -79,17 +79,13 @@ extern asmlinkage int arch_unwind_init_running(struct unwind_frame_info *, | |||
79 | void *arg), | 79 | void *arg), |
80 | void *arg); | 80 | void *arg); |
81 | 81 | ||
82 | static inline int arch_unw_user_mode(const struct unwind_frame_info *info) | 82 | static inline int arch_unw_user_mode(/*const*/ struct unwind_frame_info *info) |
83 | { | 83 | { |
84 | #if 0 /* This can only work when selector register and EFLAGS saves/restores | 84 | return user_mode_vm(&info->regs) |
85 | are properly annotated (and tracked in UNW_REGISTER_INFO). */ | 85 | || info->regs.eip < PAGE_OFFSET |
86 | return user_mode_vm(&info->regs); | ||
87 | #else | ||
88 | return info->regs.eip < PAGE_OFFSET | ||
89 | || (info->regs.eip >= __fix_to_virt(FIX_VDSO) | 86 | || (info->regs.eip >= __fix_to_virt(FIX_VDSO) |
90 | && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE) | 87 | && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE) |
91 | || info->regs.esp < PAGE_OFFSET; | 88 | || info->regs.esp < PAGE_OFFSET; |
92 | #endif | ||
93 | } | 89 | } |
94 | 90 | ||
95 | #else | 91 | #else |
diff --git a/include/asm-x86_64/unwind.h b/include/asm-x86_64/unwind.h index 2e7ff10fd775..2f6349e48717 100644 --- a/include/asm-x86_64/unwind.h +++ b/include/asm-x86_64/unwind.h | |||
@@ -87,14 +87,10 @@ extern int arch_unwind_init_running(struct unwind_frame_info *, | |||
87 | 87 | ||
88 | static inline int arch_unw_user_mode(const struct unwind_frame_info *info) | 88 | static inline int arch_unw_user_mode(const struct unwind_frame_info *info) |
89 | { | 89 | { |
90 | #if 0 /* This can only work when selector register saves/restores | 90 | return user_mode(&info->regs) |
91 | are properly annotated (and tracked in UNW_REGISTER_INFO). */ | 91 | || (long)info->regs.rip >= 0 |
92 | return user_mode(&info->regs); | ||
93 | #else | ||
94 | return (long)info->regs.rip >= 0 | ||
95 | || (info->regs.rip >= VSYSCALL_START && info->regs.rip < VSYSCALL_END) | 92 | || (info->regs.rip >= VSYSCALL_START && info->regs.rip < VSYSCALL_END) |
96 | || (long)info->regs.rsp >= 0; | 93 | || (long)info->regs.rsp >= 0; |
97 | #endif | ||
98 | } | 94 | } |
99 | 95 | ||
100 | #else | 96 | #else |