Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932308AbcLGNgx (ORCPT ); Wed, 7 Dec 2016 08:36:53 -0500 Received: from mail-wj0-f174.google.com ([209.85.210.174]:34829 "EHLO mail-wj0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753067AbcLGNgs (ORCPT ); Wed, 7 Dec 2016 08:36:48 -0500 Date: Wed, 7 Dec 2016 13:36:45 +0000 From: Matt Fleming To: Sai Praneeth Prakhya Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, jlee@suse.com, bp@alien8.de, ricardo.neri@intel.com, ard.biesheuvel@linaro.org, ravi.v.shankar@intel.com, fenghua.yu@intel.com Subject: Re: [PATCH 4/4] efi: Skip parsing of EFI_PROPERTIES_TABLE if EFI_MEMORY_ATTRIBUTES_TABLE is detected Message-ID: <20161207133645.GB17720@codeblueprint.co.uk> References: <1481051763-8705-1-git-send-email-sai.praneeth.prakhya@intel.com> <1481051763-8705-5-git-send-email-sai.praneeth.prakhya@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1481051763-8705-5-git-send-email-sai.praneeth.prakhya@intel.com> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1965 Lines: 38 On Tue, 06 Dec, at 11:16:03AM, Sai Praneeth Prakhya wrote: > From: Sai Praneeth > > UEFI specification v2.6 recommends not to use > "EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA" > attribute of EFI_PROPERTIES_TABLE. Presently, this is the *only* bit > defined in EFI_PROPERTIES_TABLE. This bit implies that EFI Runtime code > and data regions of an executable image are separate and are aligned as > specified in spec. Please refer to "EFI_PROPERTIES_TABLE" in section 4.6 > of UEFI specification v2.6 for more information on this table. > > UEFI v2.6 introduces EFI_MEMORY_ATTRIBUTES_TABLE and is intended to > replace EFI_PROPERTIES_TABLE. If EFI_MEMORY_ATTRIBUTES_TABLE is found we > skip updating of efi runtime region mappings based on > EFI_PROPERTIES_TABLE, so let's also skip parsing of EFI_PROPERTIES_TABLE > if we find EFI_MEMORY_ATTRIBUTES_TABLE because we are not using this > table anyways. The only caveat here is, if further versions of UEFI spec > adds some more bits (hence some more attributes) to EFI_PROPERTIES_TABLE > then we might need to parse it again, otherwise there is no good in > doing that. We can also expect that the same attributes might be reflected in > EFI_MEMORY_ATTRIBUTES_TABLE and hence saving us from parsing > EFI_PROPERTIES_TABLE again. > > Signed-off-by: Sai Praneeth Prakhya > Cc: Lee, Chun-Yi > Cc: Borislav Petkov > Cc: Ricardo Neri > Cc: Matt Fleming > Cc: Ard Biesheuvel > Cc: Ravi Shankar > Cc: Fenghua Yu > --- > drivers/firmware/efi/efi.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) I see where you're coming from with this patch, but I think it's unnecessary. Turning on/off parsing of Table A based on existence of Table B just seems like extra work.