From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 560692265A330 for ; Wed, 11 Apr 2018 01:38:54 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2018 01:38:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,435,1517904000"; d="scan'208";a="32503844" Received: from shwdeopenpsi777.ccr.corp.intel.com ([10.239.158.27]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2018 01:38:53 -0700 From: Jian J Wang To: edk2-devel@lists.01.org Date: Wed, 11 Apr 2018 16:38:44 +0800 Message-Id: <20180411083846.7300-1-jian.j.wang@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [PATCH 0/2] add sanity check for SetMemoryAttributes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2018 08:38:54 -0000 Heap Guard feature needs enough memory and paging to work. Otherwise calling SetMemoryAttributes to change page attribute will fail. This patch add necessary check of result of calling SetMemoryAttributes. This can help users to debug their problem in enabling this feature. Jian J Wang (2): MdeModulePkg/DxeCore: add sanity check for SetMemoryAttributes MdeModulePkg/SmmCore: add sanity check for SetMemoryAttributes MdeModulePkg/Core/Dxe/Mem/HeapGuard.c | 9 +++++++-- MdeModulePkg/Core/PiSmmCore/HeapGuard.c | 30 ++++++++++++++++++------------ 2 files changed, 25 insertions(+), 14 deletions(-) -- 2.16.2.windows.1