From 1dd6f5573ac4c32b827b6094063c83801e70491e Mon Sep 17 00:00:00 2001 From: Tomas Hruby Date: Fri, 26 Mar 2010 12:29:52 +0000 Subject: [PATCH] Direction flag - 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 | 3 --- kernel/arch/i386/sconst.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/arch/i386/mpx386.S b/kernel/arch/i386/mpx386.S index a768db586..fd46183ca 100644 --- a/kernel/arch/i386/mpx386.S +++ b/kernel/arch/i386/mpx386.S @@ -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 */ diff --git a/kernel/arch/i386/sconst.h b/kernel/arch/i386/sconst.h index 0bad53dd6..c5d32752b 100644 --- a/kernel/arch/i386/sconst.h +++ b/kernel/arch/i386/sconst.h @@ -121,6 +121,9 @@ * 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 ;\ -- 2.44.0