From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2056A211CAC87 for ; Wed, 6 Feb 2019 04:11:28 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A45B0C056817; Wed, 6 Feb 2019 12:11:27 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-4.rdu2.redhat.com [10.10.120.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9074B5C8A1; Wed, 6 Feb 2019 12:11:26 +0000 (UTC) From: Laszlo Ersek To: edk2-devel@lists.01.org Date: Wed, 6 Feb 2019 13:11:00 +0100 Message-Id: <20190206121109.8776-6-lersek@redhat.com> In-Reply-To: <20190206121109.8776-1-lersek@redhat.com> References: <20190206121109.8776-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 06 Feb 2019 12:11:27 +0000 (UTC) Subject: [PATCH 05/14] ArmVirtPkg: clean up PcdSetNxForStack setting (applies to ArmVirtQemu only) X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2019 12:11:28 -0000 Content-Transfer-Encoding: 8bit According to the PCDs not used by modules or in conditional directives sections of all the build reports for {AARCH64,ARM} x {QemuKernel,Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} (24 builds in total), the PCD is not used in any of those builds. Move the setting from "ArmVirt.dsc.inc" to "ArmVirtQemu.dsc", to reflect reality. We originally moved the PCD setting in the opposite direction in commit 8aab575c26e9 ("ArmVirtPkg: enable non-executable DXE stack for all platforms", 2017-03-07), generalizing it. However, as the comment itself states, and according to all 36 ArmVirt build reports: {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1} the PCD is only consumed by "MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf", and that module is only included in the ArmVirtQemu platform. ("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".) Cc: Ard Biesheuvel Cc: Julien Grall Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- ArmVirtPkg/ArmVirt.dsc.inc | 5 ----- ArmVirtPkg/ArmVirtQemu.dsc | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 0735c438d248..980cfa839027 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -374,11 +374,6 @@ [PcdsFixedAtBuild.common] # gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD1 - # - # Enable the non-executable DXE stack. (This gets set up by DxeIpl) - # - gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE - [Components.common] # # Ramdisk support diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 6083d65a61e5..f4b945c79ab3 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -139,6 +139,11 @@ [PcdsFixedAtBuild.common] # gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16 + # + # Enable the non-executable DXE stack. (This gets set up by DxeIpl) + # + gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE + [PcdsFixedAtBuild.AARCH64] # Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entry point, # if the entry point version is >= 3.0. AARCH64 OSes cannot assume the -- 2.19.1.3.g30247aa5d201