From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.17915.1684231210780691710 for ; Tue, 16 May 2023 03:00:21 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=AJ2wUvFj; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: dun.tan@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684231221; x=1715767221; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gwA5b4D0Y8Q+qpYTawna5DwdGyGTKtkqD+5r8beX6tw=; b=AJ2wUvFj1XVnj2tAI3JFrFGWdPJCSCdGi4DG63TqRITSusstq3N2CEXz NpZXAvIsYika7x6Y7eXv9sL16tuK09IArPcJ15GNJu/GBeN29oTdBV1N7 iF0s6PfJOvrCjMg5FZ/ZC9nUMUDLdNMtZOIoiSx6smuvtaHB2Co8iNBTE UX7kkAF6piXBkW3LqBaxZV3WZrN0btjFJOf8Wz+R6OseqPx995ld5pFSH NP4M/H3BpWOTrb3qNmP2b3b5Yen2HqJwqB27s2G61owkKONa15gi4KxGn jzwjGe1ZibKXTnr0JrmkLz7tUWTHXOJO+eA3KDnptJv9dddWUIbav7HYm w==; X-IronPort-AV: E=McAfee;i="6600,9927,10711"; a="417093212" X-IronPort-AV: E=Sophos;i="5.99,278,1677571200"; d="scan'208";a="417093212" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2023 03:00:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10711"; a="791019502" X-IronPort-AV: E=Sophos;i="5.99,278,1677571200"; d="scan'208";a="791019502" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.158]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 May 2023 03:00:20 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Liming Gao , Ray Ni , Jian J Wang Subject: [Patch V4 04/15] MdeModulePkg: Remove RO and NX protection when unset guard page Date: Tue, 16 May 2023 17:59:21 +0800 Message-Id: <20230516095932.1525-5-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20230516095932.1525-1-dun.tan@intel.com> References: <20230516095932.1525-1-dun.tan@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Remove RO and NX protection when unset guard page. When UnsetGuardPage(), remove all the memory attribute protection for guarded page. Signed-off-by: Dun Tan Cc: Liming Gao Cc: Ray Ni Cc: Jian J Wang --- MdeModulePkg/Core/PiSmmCore/HeapGuard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Core/PiSmmCore/HeapGuard.c b/MdeModulePkg/Core/PiSmmCore/HeapGuard.c index 8f3bab6fee..7daeeccf13 100644 --- a/MdeModulePkg/Core/PiSmmCore/HeapGuard.c +++ b/MdeModulePkg/Core/PiSmmCore/HeapGuard.c @@ -553,7 +553,7 @@ UnsetGuardPage ( mSmmMemoryAttribute, BaseAddress, EFI_PAGE_SIZE, - EFI_MEMORY_RP + EFI_MEMORY_RP|EFI_MEMORY_RO|EFI_MEMORY_XP ); ASSERT_EFI_ERROR (Status); mOnGuarding = FALSE; -- 2.31.1.windows.1