From patchwork Wed Oct 2 16:59:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 175023 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1020603ill; Wed, 2 Oct 2019 10:04:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxte0p+/ao54RD0WhKY1+GLn6PYwI3YK1XNkR1vkHgkVqK+iYj+NSasfBJBaXxyEaaaD5Y0 X-Received: by 2002:a50:cc4d:: with SMTP id n13mr4940358edi.5.1570035848253; Wed, 02 Oct 2019 10:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570035848; cv=none; d=google.com; s=arc-20160816; b=elaGYiIwLNvpMYohbA3aQxaU8vik3bRDBv/Zyk5Xwk8ynCxRoW099zIhNzEajZjle9 8dSyoGCi+UpkHlAkBFq4UbukpR4A357fZnTsxAR0n7DpQCIAq5JB0M59ZKYZknsiCyi8 dUb7wuahI2OjkWdx3SZDysvrAMb7AIiAbmXONVokea4s2/n+8E5zMbyVnMaLW4RY2//o nA3P96peEp3O+Tx1itdcq9IDkPdHLQwp2Uc61UrzoWaPThi2OKjMtpe0SSlY6ZP/B8hj PfzCrcE8ouqbImd6yUe4nr2tNdvXTMaeaxqURtHJPj1V7GiXEEaoad2jnEKe70ADKNGX 677Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ba3w9kcbGuMtfRQk+/aw/wvXJx7RCk+NpcTgMqWmzhU=; b=mARNodg3arCgUiR9jlOPo3Z9oT4DDQSbCR27f75tCiP2nA9J0c1zv6wqO/p8D18EHU 0yzRYgu8bvMcLdw2nWXVg6KARByFxyV+WRTEspnoxs2YelqVhupzk8dR1koajy5kXyYt D91XGfwibqt3rpkGVwaqQzqC1xvFQK4iBOKpP7OAEyBPiC3jJBVohkSELJi8SUq9u2pp JLEiB7twRrsbyIPxLhfMZR0K97oFa+T0D1ouKEnYrWPf3SkWtzAtL4tt8kbEDDLpxg4s 4Rd21NF3sTwS+4Ymd6Awwk7XbKBB7J8aSI7xAe9ZbbHrxWZ0Ni8v77uplky7gr2LS5ow Ao7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wzK2Kr+8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u14si11443585edq.167.2019.10.02.10.04.07; Wed, 02 Oct 2019 10:04:08 -0700 (PDT) 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=@linaro.org header.s=google header.b=wzK2Kr+8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728844AbfJBREG (ORCPT + 27 others); Wed, 2 Oct 2019 13:04:06 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55595 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728790AbfJBREB (ORCPT ); Wed, 2 Oct 2019 13:04:01 -0400 Received: by mail-wm1-f67.google.com with SMTP id a6so7977181wma.5 for ; Wed, 02 Oct 2019 10:03:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ba3w9kcbGuMtfRQk+/aw/wvXJx7RCk+NpcTgMqWmzhU=; b=wzK2Kr+8eqFEvQyxP/6nAjwnHPAGzZ8Pr5KF1g4HtEl208yl3hYOPNrU07OMhhzVWi MJKwplxNEH4QgfCZUR4dvDzREYAmCwTg8QcRqVIc+N86yPlchCpdJwH64aDYPis9zk8m TdMyTqaPHvXe6DL+R17NO7Ew8ajZCG6HeEYnB+26TI7BCFOg37ZX69Ifm9cCZnNvptFv dh27JTl0lOOYsJXWAQYHiDsnQ/ysVdZ3EghjNhZgsmHbWK3V+X6gAGNnlR3zit/Lp1L8 mebYi0KthRj672fvFN5LuLKZYDX6z4czZY0Slv+AbT5SR4PFSvdKM/FhltbeInqz6vfK msew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ba3w9kcbGuMtfRQk+/aw/wvXJx7RCk+NpcTgMqWmzhU=; b=TkoK0m4/NqkZmEAsLVIwvvNEpnkVlMGflKpcOuTQ1LRcdCqhZ0JQJpMvpTYVWgxObh O7zhWbqkZFwK9Ny3Gw4X+ZDyXnKZFpdllhw29N3TnrfprdSDCc6wxISgkSXdvOOa5Ryh n0GGrfFkGV1+Cl2lEjahBy71+lXQ6zUreO8uw9qH64pen8zOjAnoBiPcA11Y2rHfMt8p DdsNavTho8baoX46x6JStmwn1jjPUjObmo11kKZ22SBCUsPAQlOM0voaPPUClkKyZ0af JZRU9hBlnLzAwsq+K2MbSTByr6RqAKGofbRx62scEL6hIBn/ly1pRNJV4j1NkO8apKjT VgBA== X-Gm-Message-State: APjAAAUhPzrpHY29rv7vm9fhBbOq9ub94nE6d8malalV6zfHq7VWSOHn JLhQzIUBMzz4aGuJcs+vv4WCFw== X-Received: by 2002:a05:600c:2115:: with SMTP id u21mr3610780wml.168.1570035839244; Wed, 02 Oct 2019 10:03:59 -0700 (PDT) Received: from sudo.home ([2a01:cb1d:112:6f00:f145:3252:fc29:76c9]) by smtp.gmail.com with ESMTPSA id f18sm7085459wmh.43.2019.10.02.10.03.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 10:03:58 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Ben Dooks , Dave Young , Jarkko Sakkinen , Jerry Snitselaar , linux-integrity@vger.kernel.org, Lukas Wunner , Lyude Paul , Matthew Garrett , Octavian Purdila , Peter Jones , Scott Talbert Subject: [PATCH 7/7] efi/x86: do not clean dummy variable in kexec path Date: Wed, 2 Oct 2019 18:59:04 +0200 Message-Id: <20191002165904.8819-8-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191002165904.8819-1-ard.biesheuvel@linaro.org> References: <20191002165904.8819-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Young kexec reboot fails randomly in UEFI based kvm guest. The firmware just reset 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 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 dummy object. Drop efi_delete_dummy_variable so that kexec reboot can work. Signed-off-by: Dave Young Acked-by: Matthew Garrett Signed-off-by: Ard Biesheuvel --- arch/x86/platform/efi/efi.c | 3 --- 1 file changed, 3 deletions(-) -- 2.20.1 diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index c202e1b07e29..425e025341db 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -917,9 +917,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 }