From: "Robert S. Phillips" <rphillips@virtualiron.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Avoid double faults in stacktrace
Date: Wed, 17 May 2006 09:55:08 -0400 [thread overview]
Message-ID: <446B2B3C.4010803@virtualiron.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
This patch changes the guest_mode macro so it does not double-fault
when faced with a bogus stack pointer.
Signed-off-by: Robert S. Phillips (rphillips@virtualiron.com)
[-- Attachment #2: patch-9813-guestmode --]
[-- Type: text/plain, Size: 1683 bytes --]
# HG changeset patch
# User rphillips@rphillips
# Node ID 4ba740e1027492b5c12daa1447b2d2c71d1cc753
# Parent ac69f504f7c1fd7415927f2c9ca460de70f71b53
This patch changes the guest_mode macro so it does not double-fault
when faced with a bogus stack pointer.
Signed-off-by: Robert S. Phillips (rphillips@virtualiron.com)
diff -r ac69f504f7c1 -r 4ba740e10274 xen/include/asm-x86/regs.h
--- a/xen/include/asm-x86/regs.h Tue May 16 11:50:02 2006 -0400
+++ b/xen/include/asm-x86/regs.h Tue May 16 11:53:49 2006 -0400
@@ -35,13 +35,13 @@
({ \
unsigned long diff = (char *)guest_cpu_user_regs() - (char *)(r); \
/* Frame pointer must point into current CPU stack. */ \
- ASSERT(diff < STACK_SIZE); \
+ if (diff >= STACK_SIZE) printk("guestregs:%p r:%p\n", guest_cpu_user_regs(), r); else { \
/* If a guest frame, it must be have guest privs (unless HVM guest). */ \
/* We permit CS==0 which can come from an uninitialised trap entry. */ \
ASSERT((diff != 0) || vm86_mode(r) || ((r->cs&3) >= GUEST_KERNEL_RPL) || \
(r->cs == 0) || hvm_guest(current)); \
/* If not a guest frame, it must be a hypervisor frame. */ \
- ASSERT((diff == 0) || (!vm86_mode(r) && (r->cs == __HYPERVISOR_CS))); \
+ ASSERT((diff == 0) || (!vm86_mode(r) && (r->cs == __HYPERVISOR_CS))); } \
/* Return TRUE if it's a guest frame. */ \
(diff == 0); \
})
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2006-05-17 13:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=446B2B3C.4010803@virtualiron.com \
--to=rphillips@virtualiron.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.