[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200308080859.21568-22-ardb@kernel.org>
Date: Sun, 8 Mar 2020 09:08:52 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: linux-efi@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Ard Biesheuvel <ardb@...nel.org>, linux-kernel@...r.kernel.org,
Arvind Sankar <nivedita@...m.mit.edu>,
Christoph Hellwig <hch@....de>,
David Hildenbrand <david@...hat.com>,
Davidlohr Bueso <dave@...olabs.net>,
Guenter Roeck <linux@...ck-us.net>,
Heinrich Schuchardt <xypron.glpk@....de>,
Jonathan Corbet <corbet@....net>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Nikolai Merinov <n.merinov@...ngo-systems.com>,
Tom Lendacky <thomas.lendacky@....com>,
Vladis Dronov <vdronov@...hat.com>
Subject: [PATCH 21/28] efi/x86: preserve %ebx correctly in efi_set_virtual_address_map()
Commit 59f2a619a2db8611 ("efi: Add 'runtime' pointer to struct efi")
modified the assembler routine called by efi_set_virtual_address_map(),
to grab the 'runtime' EFI service pointer while running with paging
disabled (which is tricky to do in C code)
After the change, register %ebx is not restored correctly, resulting
in all kinds of weird behavior, so fix that.
Reported-by: Guenter Roeck <linux@...ck-us.net>
Tested-by: Guenter Roeck <linux@...ck-us.net>
Link: https://lore.kernel.org/r/20200304133515.15035-1-ardb@kernel.org
Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
---
arch/x86/platform/efi/efi_stub_32.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/platform/efi/efi_stub_32.S b/arch/x86/platform/efi/efi_stub_32.S
index 09237236fb25..09ec84f6ef51 100644
--- a/arch/x86/platform/efi/efi_stub_32.S
+++ b/arch/x86/platform/efi/efi_stub_32.S
@@ -54,7 +54,7 @@ SYM_FUNC_START(efi_call_svam)
orl $0x80000000, %edx
movl %edx, %cr0
- pop %ebx
+ movl 16(%esp), %ebx
leave
ret
SYM_FUNC_END(efi_call_svam)
--
2.17.1
Powered by blists - more mailing lists