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

[Xen-devel] [PATCH] x86-64: clear DF for kernel when forwarding syscall

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86-64: clear DF for kernel when forwarding syscall
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Fri, 22 Jun 2007 16:01:10 +0100
Delivery-date: Fri, 22 Jun 2007 07:58:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
While this is not really matching native behavior, no guest seems to assume
EFLAGS.DF being set or reflecting application state. Thus clear it for now,
the syscall/sysenter patch that I'll hopefully be able to get to work will
then introduce a more consistent solution. In any case, without this any
app can easily force kernel data corruption.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2007-06-18/xen/arch/x86/x86_64/entry.S
===================================================================
--- 2007-06-18.orig/xen/arch/x86/x86_64/entry.S 2007-06-22 16:35:55.000000000 
+0200
+++ 2007-06-18/xen/arch/x86/x86_64/entry.S      2007-06-22 16:36:59.000000000 
+0200
@@ -34,6 +34,7 @@ switch_to_kernel:
         jnc   1f
         movb  $TBF_INTERRUPT,TRAPBOUNCE_flags(%rdx)
 1:      call  create_bounce_frame
+        andl  $~X86_EFLAGS_DF,UREGS_eflags(%rsp)
         jmp   test_all_events
 
 /* %rbx: struct vcpu, interrupts disabled */




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>