瀏覽代碼

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>
H. Peter Anvin 16 年之前
父節點
當前提交
9754191278
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      arch/x86/boot/compressed/head_32.S

+ 4 - 0
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.