From patchwork Wed Jul 19 10:08:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 9851269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 018E0602C8 for ; Wed, 19 Jul 2017 10:16:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E6DF520881 for ; Wed, 19 Jul 2017 10:16:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB67B28641; Wed, 19 Jul 2017 10:16:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C22B20881 for ; Wed, 19 Jul 2017 10:16:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXlzb-0003Ga-5R; Wed, 19 Jul 2017 10:14:07 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXlzZ-0003GU-VD for xen-devel@lists.xenproject.org; Wed, 19 Jul 2017 10:14:06 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id 4F/72-01724-DE03F695; Wed, 19 Jul 2017 10:14:05 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRWlGSWpSXmKPExsXSc3klj662QX6 kwf8Dihbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bteZ/ZCn5yVey41M7YwHiVs4uRk0NIYAej xKtr4l2MHBxsAqYSM/6rgIRFBBQkNvc+Y+1i5OJgFnjGLNGy9gEjSEJYIEJi9vX/LCA2i4Cqx PNTl5lAbF4BK4kvZ3Yzg9gSAvISE3ungdVzClhLXP+8nBVil5VE75TTYDWiAmISB9/dh+oVlD g58wkLyA3MAuoS6+cJTWDknYUkMwshs4CRaRWjRnFqUVlqka6hsV5SUWZ6RkluYmaOrqGBsV5 uanFxYnpqTmJSsV5yfu4mRmDgMADBDsZt2z0PMUpyMCmJ8s7hzY8U4kvKT6nMSCzOiC8qzUkt PsQow8GhJMHrrw+UEyxKTU+tSMvMAYYwTFqCg0dJhJcLJM1bXJCYW5yZDpE6xWjJsWH1+i9MH Hf6NgDJVxP+f2MSYsnLz0uVEuflAWkQAGnIKM2DGweLs0uMslLCvIxABwrxFKQW5WaWoMq/Yh TnYFQS5pUGmcKTmVcCt/UV0EFMQAcJ++aAHFSSiJCSamBUeTs3d9f6qD21/H/P5Gcd+HRxTvJ 6uc0iF2a+1y7ZGT7JwjdszwTZDeI1anY7r69zeFhz93ml+Zan+/JZl1bUh65xPBEpW37F8vek EM6gYpErv5r3Zl84xs5VsO38NeH5sl1H9FXWXhI8LbjVL6pFlOWfR9+HhEOGp3dpr9iTL+Hit a7t+e11SizFGYmGWsxFxYkAPWHTnK4CAAA= X-Env-Sender: gregkh@linuxfoundation.org X-Msg-Ref: server-13.tower-31.messagelabs.com!1500459050!105487714!1 X-Originating-IP: [140.211.169.12] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 50333 invoked from network); 19 Jul 2017 10:10:51 -0000 Received: from mail.linuxfoundation.org (HELO mail.linuxfoundation.org) (140.211.169.12) by server-13.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 19 Jul 2017 10:10:51 -0000 Received: from localhost (LFbn-1-12253-150.w90-92.abo.wanadoo.fr [90.92.67.150]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 00110B10; Wed, 19 Jul 2017 10:10:48 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Date: Wed, 19 Jul 2017 12:08:00 +0200 Message-Id: <20170719100826.557422162@linuxfoundation.org> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170719100820.364094938@linuxfoundation.org> References: <20170719100820.364094938@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Cc: jgross@suse.com, linux-efi@vger.kernel.org, Ard Biesheuvel , Peter Zijlstra , Greg Kroah-Hartman , Daniel Kiper , stable@vger.kernel.org, Ingo Molnar , matt@codeblueprint.co.uk, andrew.cooper3@citrix.com, xen-devel@lists.xenproject.org, Thomas Gleixner , Linus Torvalds , boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH 4.11 38/88] efi: Process the MEMATTR table only if EFI_MEMMAP is enabled X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 4.11-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Kiper commit 457ea3f7e97881f937136ce0ba1f29f82b9abdb0 upstream. Otherwise e.g. Xen dom0 on x86_64 EFI platforms crashes. In theory we can check EFI_PARAVIRT too, however, EFI_MEMMAP looks more targeted and covers more cases. Signed-off-by: Daniel Kiper Reviewed-by: Ard Biesheuvel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: andrew.cooper3@citrix.com Cc: boris.ostrovsky@oracle.com Cc: jgross@suse.com Cc: linux-efi@vger.kernel.org Cc: matt@codeblueprint.co.uk Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1498128697-12943-2-git-send-email-daniel.kiper@oracle.com Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/efi/efi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -528,7 +528,8 @@ int __init efi_config_parse_tables(void } } - efi_memattr_init(); + if (efi_enabled(EFI_MEMMAP)) + efi_memattr_init(); /* Parse the EFI Properties table if it exists */ if (efi.properties_table != EFI_INVALID_TABLE_ADDR) {