mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Jan Beulich <jbeulich@novell.com>, Andi Kleen <ak@suse.de>,
	Dave Jones <davej@redhat.com>,
	Jesper Juhl <jesper.juhl@gmail.com>,
	Andrew Morton <akpm@osdl.org>
Subject: [patch] i386: fix one case of stuck dwarf2 unwinder
Date: Sat, 5 Aug 2006 16:36:46 -0400	[thread overview]
Message-ID: <200608051640_MC3-1-C736-44E2@compuserve.com> (raw)

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@compuserve.com>

---

I copied people who posted traces where this happened. Can anyone
test if this fixes the problem?

--- 2.6.18-rc3-d4.orig/include/asm-i386/unwind.h
+++ 2.6.18-rc3-d4/include/asm-i386/unwind.h
@@ -71,13 +71,14 @@ extern asmlinkage int arch_unwind_init_r
                                                                           void *arg),
                                                void *arg);
 
+extern void stext(void); /* real start of kernel text */
 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

             reply	other threads:[~2006-08-05 20:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-05 20:36 Chuck Ebbert [this message]
2006-08-06  2:30 ` Andi Kleen
2006-08-06  5:00 Chuck Ebbert
2006-08-06  6:01 ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200608051640_MC3-1-C736-44E2@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=davej@redhat.com \
    --cc=jbeulich@novell.com \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome