From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web09.30274.1649688705479281750 for ; Mon, 11 Apr 2022 07:51:46 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=NeiM3+8x; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: gang.c.chen@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649688705; x=1681224705; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=IDnYc6b3Je29o7bGaX2ptkeArnTjbdH0Wp209+FxASY=; b=NeiM3+8xTOhMSOgGDzR3FIOOx7vaxc9tFbk5Jr+5ghbNIME4/gGdZI64 JLu3qHPXc0tBjV9Zxh1KmPuKy8jZI2xcS+KkU9irJ7HRb9ojq1CDQkpu8 g8J8Ayn8CKFgTFyqls2MoOTHWblkXXIqPfnQccJXvIzzdK7oRM8bCtU1D DfnM0go+ZWqYAhsQiQMxIgaFxRP6FQspFyJxVBfZnM6o5oxFcLc7JzPtd c5h7XDUeebE1stR2yeZrhRVFIy+QecV/5okXReU2HbT9YbnG0OrBpWpAP ou/z/YA50mD+pDFyIdo0XwLt4kecRfrj20Etk2PryFA9hRvV+zWvJlz0+ g==; X-IronPort-AV: E=McAfee;i="6400,9594,10314"; a="261877939" X-IronPort-AV: E=Sophos;i="5.90,252,1643702400"; d="scan'208";a="261877939" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 07:51:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,252,1643702400"; d="scan'208";a="507138163" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga003.jf.intel.com with ESMTP; 11 Apr 2022 07:51:44 -0700 Received: from orsmsx605.amr.corp.intel.com (10.22.229.18) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 11 Apr 2022 07:51:44 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 11 Apr 2022 07:51:44 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.42) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 11 Apr 2022 07:51:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fPWvhEzHI3fqw3WIcRfwM07xh6RfFgAW5UMcywrQYCd43gFPDLdIntEQbNhvrPOm81lT44rynv0k8n3RS5AfxOEDcW9Yi8tiK5kQF2za+o/3CJkYn+lP4HMCt3LMIol83l9hVFN1HJAAoryqhVHswcoGOj2vQ47KdGT7bHAt6+5z2joi5PM4MGxgu/46b75BfCg/NSSF5OovRwldvYv0QmoDbtcVET4rPCW9zp5qiFbyLkM+/mxu6eQPY7q/DIwovB1o9husRLgU9EAihOXDVundfrdbVRMg8F6Nc7JOCBuqkpt8OaHF6Ns1Vwr+lZbdRbRahMZVOXR/T3xgBAGWcA== 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=VJ72RgKajWlB2YTG33FwJySWlknkA61SlpVRXyYZGz4=; b=igJzVZBI1bDABGJJ5XRbKBHnIVv2XYG3wrBlEL+r8KFuKaaeIB8TofMyfKGbq5ZtgiMkVeCdXDl5iCaw+AyunwFtBl6WCbYSQwC2zxFH6IA9ANnE5EFBSdS6UArGS+ABmYkVkiyuOCoZYKImfu/V38yLd7WA3NY47yalJo0S6AMYPn+4enii23IfP4kdBG4hgUB42W1Z62+MEpDPxsb2QGO7Gnx+3BlSjvAqH3rK7SPZRBFH4fOeJWHXsKMWUI/Va23hzv6RBoSEzmS0CtCs4U6VadsNJQ+dg2abGBXDCZnPv6TBRMOuDx1MJ3CCOsajCqawfHYoQWwubyP+mUq3LQ== 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 CH0PR11MB5690.namprd11.prod.outlook.com (2603:10b6:610:ed::9) by BY5PR11MB4276.namprd11.prod.outlook.com (2603:10b6:a03:1b9::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Mon, 11 Apr 2022 14:51:41 +0000 Received: from CH0PR11MB5690.namprd11.prod.outlook.com ([fe80::58dd:8641:f1e1:2985]) by CH0PR11MB5690.namprd11.prod.outlook.com ([fe80::58dd:8641:f1e1:2985%8]) with mapi id 15.20.5144.029; Mon, 11 Apr 2022 14:51:41 +0000 From: "Chen, Gang C" To: "Ni, Ray" , "devel@edk2.groups.io" , "Liu, Shuo" CC: "Jiang, Guomin" , "Bi, Dandan" , "Zhang, Di" , "Wang, Jian J" , "Gao, Liming" Subject: Re: [edk2-devel] [PATCH 1/2] MdeModulePkg/dec: update the PcdCpuStackGuard property Thread-Topic: [edk2-devel] [PATCH 1/2] MdeModulePkg/dec: update the PcdCpuStackGuard property Thread-Index: AQHYTavJo7RIMGsqm06TuvPSOxDY4qzqwsTw Date: Mon, 11 Apr 2022 14:51:41 +0000 Message-ID: References: <20220411101350.697997-1-gang.c.chen@intel.com> <20220411101350.697997-2-gang.c.chen@intel.com> In-Reply-To: Accept-Language: en-US X-Mentions: shuo.liu@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3397273c-0533-4502-f6ce-08da1bcaca05 x-ms-traffictypediagnostic: BY5PR11MB4276:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Zewlf84Id7DtgzA0EZ4cHE1agdXtAye1H/NMEI2iCZLq/q6VcYMAWcIqb+bSKST2FMKKLjueCkB+GEFGBxUf82CTTJPIKaOE2r0C/iC+o27WHrhH6/UuA8QXXH7YzoE6/ec5VAywX6ia575baoVw5FTDlBOj6TyxOW4WGkmUVcbC/AIiIc9PxDiU7N0nyOweywS9z4wIuEji7FkIhaurE5yrVMc+Aby/JDAPDbzW63HdWkF6RWPRhBsUarDIpXQKO85EcVVZZcYQ6a23YlMne+mCR/sz1JW3fGS8yWUS86t9pH+gD7myf3PzpDt4/ueee834RP0uDDXH5jkWBj45+KdduSHdEE7He/b3ZgWaq6zdQAARX0uPh1ed5+nqE4sPC0R4IaANgGrOEPxM9DwnAku+k9St6RgIlejJI2/N2/Ulr8DdQXYpHggrPRvEfHwjtU0B/ucNWAnvxmkMVFBNimSAGatTvgQ5L/Ddf8jrjDrDzQEezEMvf8aJUYygrxhczhCc6AhxNpXsyHoXOfUKnv4N4G8/UjpCC75Ri5LilLfLIOn/CrF38m6fGTZ6teYNODVCW0xaF+TFA7HZuT16vyKfVRenVd5wlwTKZ3cyVEsDl1uhKDKtNnrn8zcF8+UA8XZ5GFZcIg5/GTxlK3iq1ComOweWQowf3Bmzb457HP8wv6EWT2NoV+O5u1zP411ES9XcDUTjyDkxE8c3hEJU5e41XxDhdSVwx9nWtwsadYTH+XFDzB1T622+44XxbuywXHxfeJvJJ93HVhA1TaXXen1UGBSN1qfEAUzP7O307XD2a3Psc1PJnkXiKIErGTDp1mH1Zr+mKVU5olEbOtbjXQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR11MB5690.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(64756008)(76116006)(66476007)(66446008)(66946007)(6506007)(7696005)(15650500001)(33656002)(5660300002)(966005)(53546011)(66556008)(52536014)(4326008)(26005)(8676002)(86362001)(71200400001)(8936002)(9686003)(2906002)(186003)(38100700002)(6636002)(55016003)(508600001)(122000001)(110136005)(54906003)(82960400001)(316002)(83380400001)(38070700005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?+gqpmCQaj34KyrH4sQOUEVYyfwzHnbZMp6QiabaXMD8D8nsy6kU1ldOnLJ82?= =?us-ascii?Q?nC9hZBpheKT3cRo8BLMyLSVzRimh6XBx+jBhrWGH8B9XiQdOf9xCatU62i+M?= =?us-ascii?Q?bt8Orwt8qxyngCfJk9RmoVzydbBs3fhHTSBaJlwbAK5O3xZzgWwESUdmbfUt?= =?us-ascii?Q?YaGUH2lxCBG56I71R2wuKPpcZdmsZM3SauTYeu2BJNVNK49NMnYq4T20/DwH?= =?us-ascii?Q?8J6vhwTyfqNxZWxMz4KJZBySrNYNbXKI63ZU7KddUNLcp9TFqXvZLxiU54XZ?= =?us-ascii?Q?5FNYYKY/+LhuyixUT+kX13khgNLRLDbXRJa6efR3KxoOgdJiagZ9aetKTRL5?= =?us-ascii?Q?wee7vPs/3hkYDoVjgdjTqApM8NT2/a2Tv9suLxop6A8mkhoSbLybI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5A9I1FZbI92vz1KKa9WIvmYRMuOIulppjkEeHZR42rGYYcb?= =?us-ascii?Q?T9hq52sJq9EoIckBUk/pNG1IAiQsq4pdBN1ftLK1WJttNkd/JsOG6PnQm7jY?= =?us-ascii?Q?w9ROw1hcxHGGY4YbKqmx2kXtsIO76Tau9kuzSw+lBHAM+UWLt1b3xdzQXaLw?= =?us-ascii?Q?FEOEbvYttdyeohDGW7Rks+QGtiGuZTLivU3GvKHYAQVGFG9eq0FiK5ubPckW?= =?us-ascii?Q?KIUBgnEHwOOCibTqmLeeYcallfjCfMzMyvYVYnB1tM0n9t4fr0ECq+6yz5R6?= =?us-ascii?Q?CTeYuLrnS3qG5CgXXruNyzpH3+NdmjoFJaZQt78hV0TMVEQ40DEKS5jFiN9t?= =?us-ascii?Q?SJ/CF5ClX7WO2I02GzLkQ7sprSWyi7T1407T8CZx4O1NL0k68rT7yTVhLV4y?= =?us-ascii?Q?boMQ2S269kWyPdv6qoE0SGcNOoyKz3tMqVeOgKSpfwSZtKI8ARKnWZmZ7tjc?= =?us-ascii?Q?G7e+GKf4eA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH0PR11MB5690.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3397273c-0533-4502-f6ce-08da1bcaca05 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2022 14:51:41.1504 (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: UXjgKhFGghBbjmnizm+TsPKQSt4PkBfNDpRcqZM9+fJK7vRiNifX4tSI5YXcfM/Iq2FXY55yEJKz6WItb6JXGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4276 Return-Path: gang.c.chen@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This impact of this change is not as simple as what the patch does. -->You're correct, that's why the PATCH 2/2 removed the check in AP. Why cannot FSP API and Dispatch mode use the same setting? (either enabled = or disabled) -->For example, in coreboot, it's 32-bit, so there is no Paging needed. In = this case, it needs to disable it for FSP API mode. But this feature is nee= ded for Dispatch mode.=20 @Liu, Shuo, if any information is wrong or missed, please correct me. Thank= s. Best Regards Gang -----Original Message----- From: Ni, Ray =20 Sent: Monday, April 11, 2022 9:55 PM To: devel@edk2.groups.io; Chen, Gang C Cc: Jiang, Guomin ; Bi, Dandan ; Zhang, Di ; Wang, Jian J ; Ga= o, Liming Subject: RE: [edk2-devel] [PATCH 1/2] MdeModulePkg/dec: update the PcdCpuSt= ackGuard property FixedAtBuild PCD can be accessed at any time from any CPU. But dynamic PCD can only be accessed from BSP and after PCD database is ini= tialized. This impact of this change is not as simple as what the patch does. Why cannot FSP API and Dispatch mode use the same setting? (either enabled = or disabled) Thanks, Ray > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Chen,=20 > Gang C > Sent: Monday, April 11, 2022 6:14 PM > To: devel@edk2.groups.io > Cc: Jiang, Guomin ; Bi, Dandan=20 > ; Zhang, Di ; Wang, Jian J=20 > ; Gao, Liming > Subject: [edk2-devel] [PATCH 1/2] MdeModulePkg/dec: update the=20 > PcdCpuStackGuard property >=20 > Update the PcdCpuStackGuard from PcdsFixedAtBuild to PcdsDynamicEx for=20 > the requirement to set different value in FSP API mode and FSP=20 > Dispatch mode. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3897 >=20 > Cc: Jian J Wang > Cc: Liming Gao > Cc: devel@edk2.groups.io >=20 > Signed-off-by: Gang Chen > --- > MdeModulePkg/MdeModulePkg.dec | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) >=20 > diff --git a/MdeModulePkg/MdeModulePkg.dec=20 > b/MdeModulePkg/MdeModulePkg.dec index 463e889e9a..72e7e2eced 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -1070,13 +1070,6 @@ > # @Prompt The Heap Guard feature mask > =20 > gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask|0x0|UINT8|0x30 > 001054 >=20 > - ## Indicates if UEFI Stack Guard will be enabled. > - # If enabled, stack overflow in UEFI can be caught, preventing chaoti= c consequences.

> - # TRUE - UEFI Stack Guard will be enabled.
> - # FALSE - UEFI Stack Guard will be disabled.
> - # @Prompt Enable UEFI Stack Guard. > - =20 > gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|FALSE|BOOLEAN|0x300010 > 55 > - > [PcdsFixedAtBuild, PcdsPatchableInModule] > ## Dynamic type PCD can be registered callback function for Pcd settin= g action. > # PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum=20 > number of callback function @@ -2079,6 +2072,13 @@ > # @Prompt Enable PCIe Resizable BAR Capability support. > =20 > gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|FALSE|BOOLEA > N|0x10000024 >=20 > + ## Indicates if UEFI Stack Guard will be enabled. > + # If enabled, stack overflow in UEFI can be caught, preventing chaoti= c consequences.

> + # TRUE - UEFI Stack Guard will be enabled.
> + # FALSE - UEFI Stack Guard will be disabled.
> + # @Prompt Enable UEFI Stack Guard. > + =20 > + gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|FALSE|BOOLEAN|0x0001 > + 0025 > + > [PcdsPatchableInModule] > ## Specify memory size with page number for PEI code when > # Loading Module at Fixed Address feature is enabled. > -- > 2.35.1 >=20 >=20 >=20 >=20 >=20