From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70FB8C18E5B for ; Sun, 8 Mar 2020 08:10:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 492212146E for ; Sun, 8 Mar 2020 08:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583655026; bh=rN3pVi6vb7RD9V3f/+mRYikZsk3O/aOcSpSlsYQSHGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=b3S/kH9VcSP4nCKHp1izMItIgmdaxt8DQRK7Fkc9Og5aAklhKKJvkk0bC/JYDCIWD QAAQU8fHnl2uYayBtiCHZ4M3ZduDGiEFSSDNNbLHAGJfvuhqJ8YOpcqdE8Zgsge9Cp 205FPznASS9Dk8D7cfjWIGVutb7IOUHOXolvTZEE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726861AbgCHIKZ (ORCPT ); Sun, 8 Mar 2020 04:10:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:38188 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbgCHIKW (ORCPT ); Sun, 8 Mar 2020 04:10:22 -0400 Received: from e123331-lin.home (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr [109.210.65.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 634DC2173E; Sun, 8 Mar 2020 08:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583655021; bh=rN3pVi6vb7RD9V3f/+mRYikZsk3O/aOcSpSlsYQSHGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FDy05dQLoZC60ordL4gxXUb2JzvVbKkDG+sdDYJi8+Qft/AOgyJkl05BlPyZuKBEK IuJmORppFyv2Sx4jSZgsZh76XhK88DW9Dci3yO3Fy2HeIIHlCBvmZDmm/VjJ8z3T7e GU/L0UHAigNALVcq2/aeSy/D80IG7kMM/UIPdtdw= From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Arvind Sankar , Christoph Hellwig , David Hildenbrand , Davidlohr Bueso , Guenter Roeck , Heinrich Schuchardt , Jonathan Corbet , Lukas Bulwahn , Masahiro Yamada , Nikolai Merinov , Tom Lendacky , Vladis Dronov Subject: [PATCH 21/28] efi/x86: preserve %ebx correctly in efi_set_virtual_address_map() Date: Sun, 8 Mar 2020 09:08:52 +0100 Message-Id: <20200308080859.21568-22-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200308080859.21568-1-ardb@kernel.org> References: <20200308080859.21568-1-ardb@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Tested-by: Guenter Roeck Link: https://lore.kernel.org/r/20200304133515.15035-1-ardb@kernel.org Signed-off-by: Ard Biesheuvel --- 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