summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-06 17:56:51 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-08 17:19:01 -0700
commit97541912785369925723b6255438ad9fce2ddf04 (patch)
tree5c9e5cce0f174877046997fad05253d55b1d8532 /arch/x86/boot
parent0a137736704ef9af719409933b3c33e138461786 (diff)
downloadlinux-97541912785369925723b6255438ad9fce2ddf04.tar.gz
linux-97541912785369925723b6255438ad9fce2ddf04.tar.bz2
linux-97541912785369925723b6255438ad9fce2ddf04.zip
x86, boot: zero EFLAGS on 32 bits
The 64-bit code already clears EFLAGS as soon as it has a stack. This seems like a reasonable precaution, so do it on 32 bits as well. [ Impact: extra paranoia ] Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/compressed/head_32.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index d7245cf80261..d02a4f02be13 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -91,6 +91,10 @@ ENTRY(startup_32)
/* Set up the stack */
leal boot_stack_end(%ebx), %esp
+ /* Zero EFLAGS */
+ pushl $0
+ popfl
+
/*
* Copy the compressed kernel to the end of our buffer
* where decompression in place becomes safe.