[tip:x86/kbuild-phys] x86, boot: zero EFLAGS on 32 bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  97541912785369925723b6255438ad9fce2ddf04
Gitweb:     http://git.kernel.org/tip/97541912785369925723b6255438ad9fce2ddf04
Author:     H. Peter Anvin <hpa@xxxxxxxxx>
AuthorDate: Wed, 6 May 2009 17:56:51 -0700
Committer:  H. Peter Anvin <hpa@xxxxxxxxx>
CommitDate: Fri, 8 May 2009 17:19:01 -0700

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@xxxxxxxxx>


---
 arch/x86/boot/compressed/head_32.S |    4 ++++
 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 d7245cf..d02a4f0 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux