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 496FE220C1C31 for ; Thu, 23 Nov 2017 08:40:51 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 86E1A12122; Thu, 23 Nov 2017 16:45:08 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-221.rdu2.redhat.com [10.10.120.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id E9C7318B5C; Thu, 23 Nov 2017 16:45:07 +0000 (UTC) To: Jian J Wang , edk2-devel@lists.01.org References: <20171123021237.15396-1-jian.j.wang@intel.com> From: Laszlo Ersek Message-ID: Date: Thu, 23 Nov 2017 17:45:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171123021237.15396-1-jian.j.wang@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 23 Nov 2017 16:45:08 +0000 (UTC) Subject: Re: [PATCH v8 0/2] Fix multiple entries of RT_CODE in memory map X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2017 16:40:51 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/23/17 03:12, Jian J Wang wrote: >> v8: >> Remove merge code but keep code to remain MemoryMapStart > >> v7: >> Merge memory map after filtering paging attributes > >> v6: >> Add ExecuteDisable feature check to include/exclude EFI_MEMORY_XP > >> v5: >> Coding style clean-up > >> v4: >> a. Remove DoUpdate and check attributes mismatch all the time to avoid >> a logic hole >> b. Add warning message if failed to update capability >> c. Add local variable to hold new attributes to make code cleaner > >> v3: >> a. Add comment to explain more on updating memory capabilities >> b. Fix logic hole in updating attributes >> c. Instead of checking illegal memory space address and size, use return >> status of gDS->SetMemorySpaceCapabilities() to skip memory block which >> cannot be updated with new capabilities. > >> v2 >> a. Fix an issue which will cause setting capability failure if size is smaller >> than a page. > > More than one entry of RT_CODE memory might cause boot problem for some > old OSs. This patch will fix this issue to keep OS compatibility as much > as possible. > > More detailed information, please refer to > https://bugzilla.tianocore.org/show_bug.cgi?id=753 > > Laszlo did a thorough test on OVMF emulated platform. The details can be found > at https://bugzilla.tianocore.org/show_bug.cgi?id=753#c10 > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Jian J Wang > Tested-by: Laszlo Ersek > > Jian J Wang (2): > UefiCpuPkg/CpuDxe: Fix multiple entries of RT_CODE in memory map > MdeModulePkg/DxeCore: Filter out all paging capabilities > > MdeModulePkg/Core/Dxe/Mem/Page.c | 20 +++++++++ > UefiCpuPkg/CpuDxe/CpuPageTable.c | 94 +++++++++++++++++++++++++++++++--------- > 2 files changed, 93 insertions(+), 21 deletions(-) > Many thanks, Jian; this version looks great. From my side, please feel free to push it. Thanks, Laszlo