aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArvind Sankar <[email protected]>2020-03-08 09:08:41 +0100
committerIngo Molnar <[email protected]>2020-03-08 09:58:15 +0100
commit71ff44ac6cfaa1d8d3dff6c73636f4fb97b2be10 (patch)
tree6d1ed220408fc63b2246560ddc88b1f789a7a0dd
parent3cdcd6899eaf454b2539c624fff5daf63c175a7a (diff)
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]
-rw-r--r--arch/x86/boot/compressed/head_64.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 8105e8348607..920daf62dac2 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -660,7 +660,11 @@ SYM_DATA(efi_is64, .byte 1)
SYM_FUNC_START(efi32_pe_entry)
pushl %ebp
+ pushl %ebx
+ pushl %edi
call verify_cpu // check for long mode support
+ popl %edi
+ popl %ebx
testl %eax, %eax
movl $0x80000003, %eax // EFI_UNSUPPORTED
jnz 3f