From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.377.1686191300320666390 for ; Wed, 07 Jun 2023 19:28:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=K1DcmnDV; spf=pass (domain: intel.com, ip: 192.55.52.115, 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=1686191306; x=1717727306; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gwA5b4D0Y8Q+qpYTawna5DwdGyGTKtkqD+5r8beX6tw=; b=K1DcmnDVPuebc8ebisPHX5qjxqrqKqerkMysoYmZpnuCDRpAmrwmthti z1AMEJ3b1CpWpQ7joAu2flUHQxQg+7KE5JyP1yU7bmanddlLHTvVLppXv 1Hw8kNVvDLaFbN1yReqbXV5zTZAVPWLp2KqKY6BicKYCf7jaXr8EA/8sC CJcys+tNSs8GMYnBJofqimT0+tdYssVxdK8gEHcEzTrtyfaCB7182s4dx 6mcjX7nCeCeFEe36ZgUV6engSgS+ArUcS+Bn++2iawlkTqZoIyxOD+97L GesTVMlJUWdsu/fBUogLhqNyHC/Ti6jSPOWqbQ43oN0rcpD+MqGBt9PWQ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="357184177" X-IronPort-AV: E=Sophos;i="6.00,225,1681196400"; d="scan'208";a="357184177" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2023 19:28:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="774877691" X-IronPort-AV: E=Sophos;i="6.00,225,1681196400"; d="scan'208";a="774877691" Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.158]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2023 19:28:24 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Liming Gao , Ray Ni , Jian J Wang Subject: [Patch V5 02/14] MdeModulePkg: Remove RO and NX protection when unset guard page Date: Thu, 8 Jun 2023 10:27:30 +0800 Message-Id: <20230608022742.1292-3-dun.tan@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20230608022742.1292-1-dun.tan@intel.com> References: <20230608022742.1292-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