[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1360447729-4256-1-git-send-email-bp@alien8.de>
Date: Sat, 9 Feb 2013 23:08:49 +0100
From: Borislav Petkov <bp@...en8.de>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...e.de>
Subject: [PATCH 5/5 -v2] x86, head_32: Clear DF much earlier
From: Borislav Petkov <bp@...e.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@...e.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists