Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4489148ybx; Mon, 4 Nov 2019 14:16:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxFP4HA3786iemz27JsckPowiC93qxYEaNFB984Qiy09EgimkFjgpzquf/XHlllhuuHqG49 X-Received: by 2002:aa7:dbd4:: with SMTP id v20mr30139718edt.58.1572905776592; Mon, 04 Nov 2019 14:16:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572905776; cv=none; d=google.com; s=arc-20160816; b=TNBnoekJ0vVyDSt6J7Tnp+sRXrvjzZmKbDS8V+RbiyS0YpnUegfbxXrJcrAdFyIvSd vszXhc0Ag1XXy5EqpbRqWC/q07ZCIVna1tx0JXN4Xh55CMUcPCFntLM8sxAYjXmI8187 X2kMmyQOg3stvOtF1mUqcUO0WKAiDf3FaTahboki6R5FtsKd0gz4P4BGkiJNfJSbDeDi mM2lElFvD/HZSgqN6U/2jejBbnn1sPCEItdsGuorHDVVbPyBwr7EVH9++2qO/jotbDz9 R/jKOkj/pjfdstg1NZbXF1Bro/xfi/O8XlEsN3lqz6wfLqGsIAuR/7B7y2ALwlAirdD5 DfQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QsSg+/hHx2I+909I+n+neFJ7wVEVI5e6xHkAsJBcwWo=; b=JctenzA/N8ygjOph5rjElhStzgiXKFp8WGIAsZBJUiT+P8MQN7eh9/N7u+iUFys+bL 2JNa4WBJ47W2Td02W4/5N1ln/H3IZGto+JivPfkiVzmoiKkfT6Q0PfP/mB4zBY5D1Auw zYmqRgs8i+qFGvmYRPJwo2XOmdkotOZUUFnSo9cl0k+9vfm+gc+Mu+S7H6DbjjpVvNC3 JkvY3b9BykdR6exOks2Gy0uLlXrRgHt4xy3C+dJGBovmhemllNlMJJ1jKJsQR6H9or4b Et/HbEgo8ILaaq55B7K0NAd1y/khKObza/CDGkY3YFMTUFG7NFB1NI5SMfhIYZi9CpLB MI8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XdWHNLYb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13si12165153ejw.409.2019.11.04.14.15.52; Mon, 04 Nov 2019 14:16:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XdWHNLYb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389275AbfKDWIS (ORCPT + 99 others); Mon, 4 Nov 2019 17:08:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:40926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388378AbfKDWIK (ORCPT ); Mon, 4 Nov 2019 17:08:10 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CBC2D21744; Mon, 4 Nov 2019 22:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905289; bh=mlquCAeuub9DQjmH5s7QG9Jv8sxTcMDhb1VpuNgMqWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XdWHNLYbCPavn5BT5vjL7PnVIViFQWD5ovfqc7c4aTTWThhjlcIMxcHcPEAThvQm2 iITfI0FtOdt1SVMxEKD6JlnQKHrgIqF9nU9oymB7Bjy5Ylzn/Xygy/WDRHSuTqbC28 r874eFfTE1BRZdjVhIjL/Jg2BAUCblsZ0/PyMCvs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Young , Ard Biesheuvel , Matthew Garrett , Ben Dooks , Jarkko Sakkinen , Jerry Snitselaar , Linus Torvalds , Lukas Wunner , Lyude Paul , Octavian Purdila , Peter Jones , Peter Zijlstra , Scott Talbert , Thomas Gleixner , linux-efi@vger.kernel.org, linux-integrity@vger.kernel.org, Ingo Molnar , Sasha Levin Subject: [PATCH 5.3 052/163] efi/x86: Do not clean dummy variable in kexec path Date: Mon, 4 Nov 2019 22:44:02 +0100 Message-Id: <20191104212143.934226398@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212140.046021995@linuxfoundation.org> References: <20191104212140.046021995@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Young [ Upstream commit 2ecb7402cfc7f22764e7bbc80790e66eadb20560 ] kexec reboot fails randomly in UEFI based KVM guest. The firmware just resets while calling efi_delete_dummy_variable(); Unfortunately I don't know how to debug the firmware, it is also possible a potential problem on real hardware as well although nobody reproduced it. The intention of the efi_delete_dummy_variable is to trigger garbage collection when entering virtual mode. But SetVirtualAddressMap can only run once for each physical reboot, thus kexec_enter_virtual_mode() is not necessarily a good place to clean a dummy object. Drop the efi_delete_dummy_variable so that kexec reboot can work. Signed-off-by: Dave Young Signed-off-by: Ard Biesheuvel Acked-by: Matthew Garrett Cc: Ben Dooks Cc: Jarkko Sakkinen Cc: Jerry Snitselaar Cc: Linus Torvalds Cc: Lukas Wunner Cc: Lyude Paul Cc: Octavian Purdila Cc: Peter Jones Cc: Peter Zijlstra Cc: Scott Talbert Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Cc: linux-integrity@vger.kernel.org Link: https://lkml.kernel.org/r/20191002165904.8819-8-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/platform/efi/efi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index a7189a3b4d70f..3304f61538a26 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -894,9 +894,6 @@ static void __init kexec_enter_virtual_mode(void) if (efi_enabled(EFI_OLD_MEMMAP) && (__supported_pte_mask & _PAGE_NX)) runtime_code_page_mkexec(); - - /* clean DUMMY object */ - efi_delete_dummy_variable(); #endif } -- 2.20.1