From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 ABE9321BADAB2 for ; Thu, 19 Jul 2018 22:26:32 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2018 22:26:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,377,1526367600"; d="scan'208";a="76331886" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.19]) by orsmga002.jf.intel.com with ESMTP; 19 Jul 2018 22:26:28 -0700 From: Hao Wu To: edk2-devel@lists.01.org Cc: Jiewen Yao Date: Fri, 20 Jul 2018 13:26:20 +0800 Message-Id: <20180720052626.24932-1-hao.a.wu@intel.com> X-Mailer: git-send-email 2.12.0.windows.1 Subject: [PATCH 0/6] Check untested memory and EFI_MEMORY_RO X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 05:26:32 -0000 From: Jiewen Yao This patch series adds check for untested memory in GCD and check EFI_RUNTIME_RO in UEFI mem attrib table. The final result is: 1) untested memory is not present in SMM page table. 2) the PE code section of runtime service is not present in SMM page table. Jiewen Yao (6): MdePkg/SmmMemLib: Check for untested memory in GCD UefiCpuPkg/PiSmmCpu: Check for untested memory in GCD MdeModulePkg/DxeCore: Install UEFI mem attrib table at EndOfDxe. MdePkg/SmmMemLib: Check EFI_MEMORY_RO in UEFI mem attrib table. UefiCpuPkg/PiSmmCpu: Check EFI_RUNTIME_RO in UEFI mem attrib table. MdeModulePkg/DxeCore: Not update RtCode in MemAttrTable after EndOfDxe MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c | 36 +++- MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c | 13 ++ MdePkg/Library/SmmMemLib/SmmMemLib.c | 152 +++++++++++++- MdePkg/Library/SmmMemLib/SmmMemLib.inf | 5 + UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 2 + UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 1 + UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 217 +++++++++++++++++--- 7 files changed, 392 insertions(+), 34 deletions(-) -- 2.16.2.windows.1