Skip to content

Commit 71ff44a

Browse files
nivedita76Ingo Molnar
authored andcommitted
efi/x86: Respect 32-bit ABI in efi32_pe_entry()
verify_cpu() clobbers BX and DI. In case we have to return error, we need to preserve them to respect the 32-bit calling convention. Signed-off-by: Arvind Sankar <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent 3cdcd68 commit 71ff44a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/x86/boot/compressed/head_64.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,11 @@ SYM_DATA(efi_is64, .byte 1)
660660
SYM_FUNC_START(efi32_pe_entry)
661661
pushl %ebp
662662

663+
pushl %ebx
664+
pushl %edi
663665
call verify_cpu // check for long mode support
666+
popl %edi
667+
popl %ebx
664668
testl %eax, %eax
665669
movl $0x80000003, %eax // EFI_UNSUPPORTED
666670
jnz 3f

0 commit comments

Comments
 (0)