Messages in this thread Patch in this message |  | | From | Borislav Petkov <> | Subject | [PATCH 5/5 -v2] x86, head_32: Clear DF much earlier | Date | Sat, 9 Feb 2013 23:08:49 +0100 |
| |
From: Borislav Petkov <bp@suse.de>
All GCC versions expect the direction flag to be cleared (DF=0) so move this to the default entry point for each core.
Signed-off-by: Borislav Petkov <bp@suse.de> --- arch/x86/kernel/head_32.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 75e96d7e4e5f..8b2a8a824fc6 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -322,10 +322,11 @@ default_entry: * debugger if this code is traced. Best to initialize before switching to * protected mode. */ - pushl $0 popfl + cld # GCC wants DF=0 at all times + /* * New page tables may be in 4Mbyte page mode and may be using the global pages. * @@ -463,7 +464,6 @@ is486: xorl %eax,%eax # Clear LDT lldt %ax - cld # gcc2 wants the direction flag cleared at all times pushl $0 # fake return address for unwinder jmp *(initial_code) -- 1.8.1.3.535.ga923c31
|  |