Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbdFUHsl (ORCPT ); Wed, 21 Jun 2017 03:48:41 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:35313 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750987AbdFUHsi (ORCPT ); Wed, 21 Jun 2017 03:48:38 -0400 MIME-Version: 1.0 In-Reply-To: <1497989668-6238-2-git-send-email-daniel.kiper@oracle.com> References: <1497989668-6238-1-git-send-email-daniel.kiper@oracle.com> <1497989668-6238-2-git-send-email-daniel.kiper@oracle.com> From: Ard Biesheuvel Date: Wed, 21 Jun 2017 09:48:37 +0200 Message-ID: Subject: Re: [PATCH 1/2] efi: Process MEMATTR table only if EFI_MEMMAP To: Daniel Kiper Cc: "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "stable@vger.kernel.org" , xen-devel@lists.xenproject.org, Boris Ostrovsky , Juergen Gross , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , Matt Fleming Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1010 Lines: 31 On 20 June 2017 at 22:14, Daniel Kiper wrote: > Otherwise e.g. Xen dom0 on x86_64 EFI platforms crashes. > > In theory we can check EFI_PARAVIRT too, however, > EFI_MEMMAP looks more generic and covers more cases. > > Signed-off-by: Daniel Kiper Reviewed-by: Ard Biesheuvel > --- > drivers/firmware/efi/efi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c > index b372aad..045d6d3 100644 > --- a/drivers/firmware/efi/efi.c > +++ b/drivers/firmware/efi/efi.c > @@ -528,7 +528,8 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz, > } > } > > - 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) { > -- > 1.7.10.4 >