[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:  36e8d6753b3937ebcd58c1f943ea832c519dd5a8
Gitweb:     http://git.kernel.org/tip/36e8d6753b3937ebcd58c1f943ea832c519dd5a8
Author:     H. Peter Anvin <hpa@xxxxxxxxx>
AuthorDate: Wed, 6 May 2009 17:56:51 -0700
Committer:  H. Peter Anvin <hpa@xxxxxxxxx>
CommitDate: Wed, 6 May 2009 18:49:55 -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 |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 47636b3..48c2047 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -12,9 +12,9 @@
  * the page directory. [According to comments etc elsewhere on a compressed
  * kernel it will end up at 0x1000 + 1Mb I hope so as I assume this. - AC]
  *
- * Page 0 is deliberately kept safe, since System Management Mode code in 
+ * Page 0 is deliberately kept safe, since System Management Mode code in
  * laptops may need to access the BIOS data stored there.  This is also
- * useful for future device drivers that either access the BIOS via VM86 
+ * useful for future device drivers that either access the BIOS via VM86
  * mode.
  */
 
@@ -84,6 +84,12 @@ ENTRY(startup_32)
 	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