summaryrefslogtreecommitdiff
path: root/include/asm-x86_64/unwind.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-12-07 02:14:13 +0100
committerAndi Kleen <andi@basil.nowhere.org>2006-12-07 02:14:13 +0100
commit359ad0d4015a9ab39243f2ebc4eb07915bd618b2 (patch)
tree90f05d8d9ab048029bfe1e451a012b4d5896aafe /include/asm-x86_64/unwind.h
parenteef5e0d185fc049bda11fa14ba286fbd357da896 (diff)
[PATCH] unwinder: more sanity checks in Dwarf2 unwinder
Tighten the requirements on both input to and output from the Dwarf2 unwinder. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include/asm-x86_64/unwind.h')
-rw-r--r--include/asm-x86_64/unwind.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/asm-x86_64/unwind.h b/include/asm-x86_64/unwind.h
index 2e7ff10fd77..2f6349e4871 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 *,
static inline int arch_unw_user_mode(const struct unwind_frame_info *info)
{
-#if 0 /* This can only work when selector register saves/restores
- are properly annotated (and tracked in UNW_REGISTER_INFO). */
- return user_mode(&info->regs);
-#else
- return (long)info->regs.rip >= 0
+ return user_mode(&info->regs)
+ || (long)info->regs.rip >= 0
|| (info->regs.rip >= VSYSCALL_START && info->regs.rip < VSYSCALL_END)
|| (long)info->regs.rsp >= 0;
-#endif
}
#else