lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <200608060105_MC3-1-C73A-EF22@compuserve.com>
Date:	Sun, 6 Aug 2006 01:00:43 -0400
From:	Chuck Ebbert <76306.1226@...puserve.com>
To:	Andi Kleen <ak@...e.de>
Cc:	Andrew Morton <akpm@...l.org>, Jesper Juhl <jesper.juhl@...il.com>,
	Dave Jones <davej@...hat.com>,
	Jan Beulich <jbeulich@...ell.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [patch] i386: fix one case of stuck dwarf2 unwinder

In-Reply-To: <200608060430.06935.ak@...e.de>

On Sun, 6 Aug 2006 04:30:06 +0200, Andi Kleen wrote:
> 
> > +extern void stext(void); /* real start of kernel text */
> 
> Can't you use _stext[] from asm/sections.h?

OK.


[patch] i386: fix one case of stuck dwarf2 unwinder

When the dwarf2 unwinder does its thing, sometimes it ends up in
kernel startup code in head.S.  Changing arch_unw_user_mode() to
treat that case as if it were user mode is the easy fix.

Signed-off-by: Chuck Ebbert <76306.1226@...puserve.com>

--- 2.6.18-rc3-32.orig/include/asm-i386/unwind.h
+++ 2.6.18-rc3-32/include/asm-i386/unwind.h
@@ -13,6 +13,7 @@
 #include <asm/fixmap.h>
 #include <asm/ptrace.h>
 #include <asm/uaccess.h>
+#include <asm/sections.h>
 
 struct unwind_frame_info
 {
@@ -71,13 +72,14 @@ extern asmlinkage int arch_unwind_init_r
                                                                           void *arg),
                                                void *arg);
 
+/* check if unwind has reached either user mode or kernel startup code */
 static inline int arch_unw_user_mode(const struct unwind_frame_info *info)
 {
 #if 0 /* This can only work when selector register and EFLAGS saves/restores
          are properly annotated (and tracked in UNW_REGISTER_INFO). */
 	return user_mode_vm(&info->regs);
 #else
-	return info->regs.eip < PAGE_OFFSET
+	return info->regs.eip < (unsigned long)_stext
 	       || (info->regs.eip >= __fix_to_virt(FIX_VDSO)
 	            && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE)
 	       || info->regs.esp < PAGE_OFFSET;
-- 
Chuck
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ