From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web10.5381.1686218906888081748 for ; Thu, 08 Jun 2023 03:08:27 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=YPVojxTY; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686218906; x=1717754906; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=MPBlm+3Im1+y2yEb/GiQjI4mQ1SKorqEPV8yly/7oyE=; b=YPVojxTYI26Exu58jGIeV0NmWcV2PtpDVRw3gDPYYvvyD/Eyy/QgvpzI nsoB88LqJWHA+ZSg7vKbMxrF3ELq/8OfWvPmZLHUI0re97Kt89jBUz2O9 +xTjwVGZ2bBDAKxkGUDdvQRria0j38OK5ju3MFSQHMhXHAl9dOvdVkuK7 PuvNb5PjOyCO+N8w0Hc+hJP6rMD8Dv0FzQqMXRtxuKsnRMYqGe2pA7cuM vJjubplTgKoaqZAoExyXeRCWrm+mqECANkF2Rscoa84B+w8yw9lCaIZnq FIHm1ywVxa+nLvrqTEMik7uvv+ppIalA/VnZvcUbkOHsyveTcxfd7aIPl A==; X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="385609556" X-IronPort-AV: E=Sophos;i="6.00,226,1681196400"; d="scan'208";a="385609556" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 03:08:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="834126109" X-IronPort-AV: E=Sophos;i="6.00,226,1681196400"; d="scan'208";a="834126109" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga004.jf.intel.com with ESMTP; 08 Jun 2023 03:08:26 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 8 Jun 2023 03:08:25 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 8 Jun 2023 03:08:25 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Thu, 8 Jun 2023 03:08:25 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.109) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Thu, 8 Jun 2023 03:08:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TFzw/MbpFeyoQP6bd11pjlaHGgtKcUAxNfEymn2w8p/hCOTdKh9E+pdIp2ludq+N5qoyLAXSTf9gnnJuLlIUOcxFwaMrzdFTLIyZ2VYosUwqANN2STbGxG8inv+ym9VVdWS1hPyHfWtFrbuDM4ox5ozRJ97NfRXPlaf1PAgGpm1tRf+wppuzjdetNcUmqK2rQmYldBiiUQnZnzPIZpxPuWI/iRu5oYSQmXvZUVh+a9u2pUqSErOBLNSY684jQYbbhKoiCtDGO1uogSYGP2rWc5BTy/xl3buCGFqUyFS+mhJZUJRr0zj5DsSQR5lseZH2Z6H1HD+rks6To3tL1nLmTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L/n/FGMs+rpAEQWs3Pjz9/pWTXs8UKHaZhiAUVoIskM=; b=ZVKOy9APCB+1NzNndGJWI0bhI9UFh8M21L/XOT/+LKEA1QjgT198bj5iY55N7WOYsfMCKL/wS5H20C4jq6MpD4MkTWa+7RAvb1E/pDLlWkACVT8CKKmsQ+3k16NGINa8vZP3AegdiGll9kRIfXjAyPku7l/u0h3QWhnG1NDYwmY3GRvC4P2rUYjLf2cGiaU9qYU/RyA0u6BabcDrRxI/XIOKQNI6cw8fDamJzlRdGrSrjHsBuMUe2yB0/6IkyTHPKj0c/THeWmGOS4qofwYbdXU0nHZd9XcP7wAlasg9s7yQzlrpcRM4gu7MgZX8jC0PacNfilrZT9LCvxixamLjaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by SJ0PR11MB5182.namprd11.prod.outlook.com (2603:10b6:a03:2ae::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.19; Thu, 8 Jun 2023 10:08:22 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::892b:b8e6:bab7:635d]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::892b:b8e6:bab7:635d%2]) with mapi id 15.20.6455.034; Thu, 8 Jun 2023 10:08:22 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Wang, Jian J" Subject: Re: [Patch V5 02/14] MdeModulePkg: Remove RO and NX protection when unset guard page Thread-Topic: [Patch V5 02/14] MdeModulePkg: Remove RO and NX protection when unset guard page Thread-Index: AQHZmbDq1mt/JLVhckiQ4cGoZa5bZ6+Art7A Date: Thu, 8 Jun 2023 10:08:22 +0000 Message-ID: References: <20230608022742.1292-1-dun.tan@intel.com> <20230608022742.1292-3-dun.tan@intel.com> In-Reply-To: <20230608022742.1292-3-dun.tan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|SJ0PR11MB5182:EE_ x-ms-office365-filtering-correlation-id: 1d34f79f-1f7e-4313-6518-08db68084abf x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: CZZMBPptmhvVyWgSWfYzM6RTXZ/p3CQyKPP/LtzwfH87GgsYgDEB7zJSKIXz2z/JLPW80NNPLNrEVzHrtFUor86L9VCyTbTwwAnf/S1eQ29qLOZauqzkaBU55+s7gJycgil/K7eldHi6v3P7ui0038+fKh1nsd74fCpozVPdD6eQgYpfbh9YBTt9xL4Lqokv+MV1Lfio6NDOQoUkLLocKwiFC2f6hlj2Uv8/H6LSUNXGN2M2y01gCJjIf6u4u2g6EdPkAslztrQl/FKf34LxR7DuCt8cssYkWCnEHAzCnFq824OTNM7R3vbI1khB8j9dEBggZDcg7nkQy+zH13izWrlramRrQ1/tmlX8wNppzCc/J8R8gXxdwcliS/RXai2usN6aIIDLeaon3EAS9L40xpnI4vfkIs1Q9eNfGEp2DlZUxq8i1Z/Ic/ys7NeLbXfYbjTARsxcU1HS0Ut1x+r2VIgrJT2vm2+yZH9LDYblwgjetX6raiaAc+ZOS+wTDtGhqAtZ5zQ2nHbXC6J5BpKi1V/LObbIxhpHj9QR9EA6sLHMHJPMQA791O18SDeiTQSbE6L6M64jDsBtS2Ntb9LMSkgwcXp19KEHIa9BvqRIpUwVbHKpkfsKnh8O8KF3OQ1i x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(396003)(366004)(136003)(346002)(376002)(39860400002)(451199021)(86362001)(53546011)(186003)(55016003)(107886003)(9686003)(82960400001)(6506007)(26005)(33656002)(7696005)(83380400001)(8936002)(8676002)(71200400001)(5660300002)(478600001)(110136005)(54906003)(52536014)(38070700005)(38100700002)(2906002)(316002)(66946007)(41300700001)(76116006)(4326008)(64756008)(122000001)(66556008)(66446008)(66476007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?25LpufzZHc/OHwaBgpv9KsSX6YYBBfr7CWwu+W9nV5qg2bfKm/X/svGv85Qd?= =?us-ascii?Q?1CpFVWDaKlGi7I3gcC60ZQWSGMFX3fQDb675wRfXovH5HIm+h2NqisPHDack?= =?us-ascii?Q?5ki5ulHYtJ54ZtACM1WpSv5uBeuUjVMq8CGeuGVg5xLjDCJxoJM9jc9FjF/R?= =?us-ascii?Q?6YPCNLgFxm+bXkslu491djQJsdeP429Mk0saoFDGazm3jEvkzZhP16Hm51kN?= =?us-ascii?Q?BC1vv6LjWIE2iP28Zq/c7vYhjzgXgAeiIwwpFGZDmqnOI/jsZ14pAmO4VnIH?= =?us-ascii?Q?6PznFbd3w7oMXyFMa7qmVNhwpWSxRgdbJ0AKczmc3OfMo4JSL0GnkbrGJhl4?= =?us-ascii?Q?Epcfo8DWgqXO1qzd+t4DfXymm5wAowFE1DSnhJS1o0kw0LDGMU9O/eiG2ZyJ?= =?us-ascii?Q?epwHj8VONiJAVWhDn0chrUlZr67VzIoM4gE0mi3t2tY7II90B60FynTOx0C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bTS/DcT6oOYTfRUbfQSO?= =?us-ascii?Q?GvcSJzqEK3cs24V0mZZeA3vlQDBNZwyx+X7sA2r+EYu46npY7Znv6yScziZo?= =?us-ascii?Q?4oRaEO1cxF7d/cvJp1tHfgkoB37qI/U/EHHFNhJyWGm90y2HUn+Ln+mExmzG?= =?us-ascii?Q?ZinOUxDhXb+kE+XoSQ4WG+mzk4NqJT2sRr6auzsavuD5ryTzhM1UExDn4slq?= =?us-ascii?Q?dWjHjVocvn7XySFNn+x8leajbhsvZGFrYj0BN/JB?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d34f79f-1f7e-4313-6518-08db68084abf X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jun 2023 10:08:22.5743 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: WahMrO4Vx2wfDlQzPoM6L3cJGjjqvjXu8p8sDkj+0jV3PMdfK3kK3ERvP0ZLOmxutuEH93hrpchX3B48JCM5Ew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5182 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Tan, Dun > Sent: Thursday, June 8, 2023 10:28 AM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Ni, Ray ; > Wang, Jian J > Subject: [Patch V5 02/14] MdeModulePkg: Remove RO and NX protection > when unset guard page >=20 > Remove RO and NX protection when unset guard page. > When UnsetGuardPage(), remove all the memory attribute protection > for guarded page. >=20 > 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(-) >=20 > 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 =3D FALSE; > -- > 2.31.1.windows.1