summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorH. Peter Anvin2009-05-07 02:56:51 +0200
committerH. Peter Anvin2009-05-09 02:19:01 +0200
commit97541912785369925723b6255438ad9fce2ddf04 (patch)
tree5c9e5cce0f174877046997fad05253d55b1d8532 /arch
parentx86, boot: set up the decompression stack as early as possible (diff)
downloadkernel-qcow2-linux-97541912785369925723b6255438ad9fce2ddf04.tar.gz
kernel-qcow2-linux-97541912785369925723b6255438ad9fce2ddf04.tar.xz
kernel-qcow2-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')
-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.