]> Zhao Yanbai Git Server - minix.git/commitdiff
Direction flag
authorTomas Hruby <tom@minix3.org>
Fri, 26 Mar 2010 12:29:52 +0000 (12:29 +0000)
committerTomas Hruby <tom@minix3.org>
Fri, 26 Mar 2010 12:29:52 +0000 (12:29 +0000)
- ack assumes that the direction flag in eflags is clear when
  assigning two structures. It is implemented by a call to a built-in
  function which is like memcpy but needs the flag to be clear
  otherwise rubish is copied. This patch fixes the kernel entries.

kernel/arch/i386/mpx386.S
kernel/arch/i386/sconst.h

index a768db586392418a9fa5670a601b5561c95cc38d..fd46183caf604493105c8d508b9b23fa6dc4795e 100644 (file)
@@ -472,9 +472,6 @@ exception_entry:
        TEST_INT_IN_KERNEL(12, exception_entry_nested)
 
 exception_entry_from_user:
-
-       cld
-
        SAVE_PROCESS_CTX(8)
 
        /* stop user process cycles */
index 0bad53dd6ab5595bd38753f7efdfb6ce73ac2384..c5d32752bc79346e048983f53bdbfbf973ba3c37 100644 (file)
  * value on the stack - error code and the exception number
  */
 #define SAVE_PROCESS_CTX_NON_LAZY(displ) \
+                                                               \
+       cld /* set the direction flag to a known state */       ;\
+                                                               \
        push    %ebp                                    ;\
                                                        ;\
        movl    (CURR_PROC_PTR + 4 + displ)(%esp), %ebp ;\