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 8CD342114399C for ; Wed, 19 Sep 2018 04:39:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0639D3091D54; Wed, 19 Sep 2018 11:39:06 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-175.rdu2.redhat.com [10.10.120.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1ECE17A80; Wed, 19 Sep 2018 11:39:04 +0000 (UTC) To: "Wang, Jian J" , "Zeng, Star" , "edk2-devel@lists.01.org" Cc: Ard Biesheuvel , "Ni, Ruiyu" , "Yao, Jiewen" References: <20180914051335.2644-1-jian.j.wang@intel.com> <9d5d297a-4d10-3ffd-3d02-1f369cfe5bda@redhat.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BBBA7A4@shsmsx102.ccr.corp.intel.com> <397ee56b-0c32-09a7-5542-ea6f81e6c211@redhat.com> <0C09AFA07DD0434D9E2A0C6AEB0483103BBBAFDA@shsmsx102.ccr.corp.intel.com> From: Laszlo Ersek Message-ID: <361a8f4d-19d1-d763-2dc4-1714ba7da64f@redhat.com> Date: Wed, 19 Sep 2018 13:39:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 19 Sep 2018 11:39:06 +0000 (UTC) Subject: Re: [PATCH] MdeModulePkg/DxeIpl: support more NX related PCDs 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, 19 Sep 2018 11:39:06 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 09/19/18 11:13, Wang, Jian J wrote: > If no more new comments, I'll do following changes in v2, including review > comments got so far: > > a. change ToEnableExecuteDisableFeature() to EnableNonExec() > b. remove the ASSERT and DEBUG in current ToEnableExecuteDisableFeature() > c. update dec/uni file to clarify the usage of following PCDs > PcdNxSetForStack > TRUE - Apply NX to stack memory > FALSE - Don't care of protection of stack memory > PcdImageProtectionPolicy > 1 - Apply NX to data section of image from the corresponding origin > 0 - Don't care of the protection of data section of image from the corresponding origin > PcdDxeNxMemoryProtectionPolicy > 1 - Apply NX to corresponding type of memory > 0 - Don't care of the protection of corresponding type of memory Good summary, and I think this is a workable approach as well. Defining value 0 as "don't care" or "no-op", rather than "unset this feature", eliminates contradictory configurations. Thanks Laszlo