Skip to content

Commit

Permalink
x86, boot: zero EFLAGS on 32 bits
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H. Peter Anvin committed May 9, 2009
1 parent 0a13773 commit 9754191
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/x86/boot/compressed/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9754191

Please sign in to comment.