WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Doamin crash when trying to install disk encryption (Po

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Doamin crash when trying to install disk encryption (PointSec) on Windows HVM
From: Tom Rotenberg <tom.rotenberg@xxxxxxxxx>
Date: Sun, 26 Apr 2009 14:23:15 +0300
Cc: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 26 Apr 2009 04:24:13 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=W/D1h8j++tev2OYGofoe58ME02TW/10EomNmG1NCf+8=; b=CeWMYBqKMmPFr8AgLjxLE8pioLJzetJBFRHRjV/d12JTXVnUQpmqaw1WWoQ1gkKQCY NGKaRGylXgIeFRjqIGpVgpf2yqsfJtPniFkBuJzMR9W9DUBxjmG9F+bKzaxb1drdxble xR1AtYFcG1/RLQ1bMNHRFEvNXYjgQfguVd6wk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=flb2yenBKB1MZUgajvzwNWMSWs6mBsmfIAXvzUPJe9qOEOisBAgJS/LPAssx2Jtnwc 0+92+hS9GkUJzJDVYpX6c/vV14Hb59I1xbrc4KT9gDrpiz35okIZ1yC/H0TVmhc6LN3c DZu9zIz3CMGGjmh+aaAwgMhEmyFGEgNYkN0Go=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <8686c3cd0904260414v204652faw5a5a599058a30804@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <8686c3cd0904231100w60222e91j431ce985c619f63b@xxxxxxxxxxxxxx> <C6167198.95F5%keir.fraser@xxxxxxxxxxxxx> <8686c3cd0904260359n6e40ab38i12703b16091fbe11@xxxxxxxxxxxxxx> <8686c3cd0904260414v204652faw5a5a599058a30804@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Keir/Tim

Why did u add the check in load_seg() function x86_emulate.c:
diff -r 8b152638adaa xen/arch/x86/x86_emulate/x86_emulate.c
--- a/xen/arch/x86/x86_emulate/x86_emulate.c    Thu Apr 23 16:22:48 2009 +0100
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c    Thu Apr 23 18:47:17 2009 +0100
@@ -1099,7 +1099,7 @@
          (ops->write_segment == NULL) )
         return X86EMUL_UNHANDLEABLE;
 
-    if ( in_protmode(ctxt, ops) )
+    if ( in_protmode(ctxt, ops) || !is_x86_user_segment(seg) )
         return protmode_load_seg(seg, sel, ctxt, ops);

Why is it needed? and what will happen in case we will need to emulate a load of user segment in protected mode? right now, it will just not be performed. is this even legal?

Tom

2009/4/26 Tom Rotenberg <tom.rotenberg@xxxxxxxxx>
Just saw the reason for the 0xf3 attribute in the Intel Spec.
Sorry...

2009/4/26 Tom Rotenberg <tom.rotenberg@xxxxxxxxx>

Keir,

I'm trying to figure out what causes the bug i'm experiencing, and i suspect that the TSS patch you have sent me has bugs. I saw in your patch, that you are setting the attributes of the every user segment (including CS) to be 0xf3, which sets the segment type to Data R/W. Don't you need to set the CS segment type to be Code R/W?

Tom

2009/4/23 Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
On 23/04/2009 19:00, "Tom Rotenberg" <tom.rotenberg@xxxxxxxxx> wrote:


> I have applied the patch, and it looks like now it passed this part. However,
> now, it hangs, and doesn't show the PointSec pre-boot GUI. I have also seen
> the following messages in 'xm dmesg':
>
> (XEN) HVM2: Booting from Hard Disk...
> (XEN) HVM2: Booting from 0000:7c00
> (XEN) multi.c:3351:d2 write to pagetable during event injection: cr2=0x2234bc,
> mfn=0x29c23
> (XEN) multi.c:3351:d2 write to pagetable during event injection:
> cr2=0x1032ff8, mfn=0x28e32
> (XEN) multi.c:3351:d2 write to pagetable during event injection:
> cr2=0x102fff8, mfn=0x28e2f
>
> Do u have any idea what may cause this problem?

Those messages are usually rare and typically indicate that a guest
pagetable page has been recycled as a kernel stack page, and is being
written to as part of an exception/interrupt delivery. My guess for why
you're seeing it is that you've entered some horrible exception loop where
the exception handler causes another exception, and this repeats itself.
This would cause the stack to overwrite memory (as exception stack frames
stack up one on top of the other on top of the other...), taking out
pagetable pages as it goes. You'd then hang or crash when enough memory is
overwitten that the exception loop gets broken.

Since the root cause of the exceptions happened some time back in execution,
this could be a pain to debug. :-) And my theory may not even be correct...

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>