From patchwork Wed Jul 19 09:43:33 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: 9850983 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 3A56D60392 for ; Wed, 19 Jul 2017 09:47:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1778728631 for ; Wed, 19 Jul 2017 09:47:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C21C2863C; Wed, 19 Jul 2017 09:47:50 +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 8152928631 for ; Wed, 19 Jul 2017 09:47:49 +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 1dXlYO-0008U6-1X; Wed, 19 Jul 2017 09:46:00 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXlYM-0008Ts-JV for xen-devel@lists.xenproject.org; Wed, 19 Jul 2017 09:45:58 +0000 Received: from [85.158.143.35] by server-11.bemta-6.messagelabs.com id 8C/5B-03612-55A2F695; Wed, 19 Jul 2017 09:45:57 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprDIsWRWlGSWpSXmKPExsXSc3klj26oVn6 kwYvdIhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8beA2tZCn5yVdyYv5WtgfEqZxcjF4eQwA5G iZkNq5m6GDk42ARMJWb8V+li5OQQEVCQ2Nz7jBWkhlngGbNEy9oHjCAJYYEIiVsP57GD2CwCq hInV6xiA7F5BawkGua/BquREJCXmNg7DczmFLCWmLRqB1iNEFDN9JlXmEBsUQExiYPv7jNB9A pKnJz5hAXkBmYBdYn184QmMPLOQpKZhZBZwMi0ilGjOLWoLLVI19BML6koMz2jJDcxM0fX0MB MLze1uDgxPTUnMalYLzk/dxMjMHQYgGAH4/2NAYcYJTmYlER55/DmRwrxJeWnVGYkFmfEF5Xm pBYfYpTh4FCS4J2kAZQTLEpNT61Iy8wBBjFMWoKDR0mEV08TKM1bXJCYW5yZDpE6xWjJsWH1+ i9MHHf6NgDJVxP+f2MSYsnLz0uVEufdCzJPAKQhozQPbhws0i4xykoJ8zICHSjEU5BalJtZgi r/ilGcg1EJqAJkLU9mXgnc1ldABzEBHSTsmwNyUEkiQkqqgfFk8KwFabGq9dVrV7yffWaKNOP x4+fucHU/unVDZjn3MQlFf1s3Gy9+Vu6LRzdlHmqRKKxSu8P0PPtgdGm7GNd77/fmzyfVLNr9 4cX3ZHnDbQ6lEw9Mj/xUxCWqsGfbq1dlB5/mOEw+e1BjyZsPZzo9uVVP9Zi/fXQ0WnCRv9Ot1 jqexrTKq+1KLMUZiYZazEXFiQCzAZjGrwIAAA== X-Env-Sender: gregkh@linuxfoundation.org X-Msg-Ref: server-13.tower-21.messagelabs.com!1500457555!68084137!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 38086 invoked from network); 19 Jul 2017 09:45:57 -0000 Received: from mail.linuxfoundation.org (HELO mail.linuxfoundation.org) (140.211.169.12) by server-13.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 19 Jul 2017 09:45:57 -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 B97F4B49; Wed, 19 Jul 2017 09:45:44 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Date: Wed, 19 Jul 2017 11:43:33 +0200 Message-Id: <20170719092323.437018318@linuxfoundation.org> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170719092322.362625377@linuxfoundation.org> References: <20170719092322.362625377@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.12 27/84] 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.12-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) {