efi/libstub/x86: Avoid globals to store context during mixed mode calls
authorArd Biesheuvel <ardb@kernel.org>
Tue, 24 Dec 2019 15:10:25 +0000 (16:10 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 25 Dec 2019 09:49:26 +0000 (10:49 +0100)
commit0679715e714345d273c0e1eb78078535ffc4b2a1
tree2f16e5a2898318fc0d08ea77f7c12d6a6d1919b5
parent7d4e323d02c9a37d68c067f5a951307f3af14694
efi/libstub/x86: Avoid globals to store context during mixed mode calls

Instead of storing the return address in a global variable when calling
a 32-bit EFI service from the 64-bit stub, avoid the indirection via
efi_exit32, and take the return address from the stack.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Arvind Sankar <nivedita@alum.mit.edu>
Cc: Borislav Petkov <bp@alien8.de>
Cc: James Morse <james.morse@arm.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20191224151025.32482-26-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/boot/compressed/efi_thunk_64.S