From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.26756.1649667784382472670 for ; Mon, 11 Apr 2022 02:03:06 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Ngioa7QH; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: jian.j.wang@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649667785; x=1681203785; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=2hVf+w7FS9G/r/881TintQ3onAPByOhZyAhdY5BAf+c=; b=Ngioa7QHbFzyz4T90JjAMOjKnb+rvbmFXZYfWoYvkwzXommPVzL+H7YK UfMEANgJujpmpnHzSWjENBIIpjS4FdeYu5gtJcPZjzUYkSE8mZzR/a0GI MXlKbWdZYuC2LbZY6YVERDclO0fGK/kzy+kQsnWc1Wp+j/wG21kxX9qPW GRGG4WDziWQKQJji/h5ojTQeIwS+f3wRvqXEzI/T8kX6QDTfbsSxeNLph P1vUWWjfcT7fbSmhrRzjdGxxVDOvm9185TWXo8iPCafVCparHUSO3hhL8 XjTM7KPIPTuLANBTmTSDUlWtnAUl0qaiu08u4j4rFBUCITBa96B7NqrWF w==; X-IronPort-AV: E=McAfee;i="6400,9594,10313"; a="243955348" X-IronPort-AV: E=Sophos;i="5.90,251,1643702400"; d="scan'208";a="243955348" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 02:03:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,251,1643702400"; d="scan'208";a="572037880" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga008.jf.intel.com with ESMTP; 11 Apr 2022 02:03:00 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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 02:03:00 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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.2308.27 via Frontend Transport; Mon, 11 Apr 2022 02:03:00 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.49) by edgegateway.intel.com (192.55.55.70) 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 02:02:59 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k0jy0gAN3uJcc4uy/6nvNjK0NgG2gq1m9Yiv4v9UiOvapU47mNsqFt5kBCCCP7u3Ct2taqSFM417O+cni1gkJdORgMhtxsdJ8XuvQmqXM2qxwgwEZccjLqeR1XVRsSkBKQ9jYG+9HYDKYY/B66/wlg9Ct7yH44Kc4atQ5PPdDJGzdv9L8UwugYluf9qqGbLlrGpzlA5KYoftYzOYAeFeNU3T3Eu59rb21wZSSJ2m0vCvTNOAjLem8cdsxN5AdF3ZohGhPx6N6PPVAcX/3ODsAe6QMe9fOEvX+/GKtnqINmD1EXgzOcxYkeJWT+xf2ZLwtK3hX+2OBBzFMW4IKYUzWQ== 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=cam1MbgiYgLqrrGD0OEWHZzzpdLVA5QebLEtSS1kC6M=; b=O7MOCNkw1vUB5pI/Sv2TikLekutHxfDGfrLrwadSqDikAITRh99IlMtayzPsNOTbcxXBB5WNYN7E1Yt4q3VvLKihWTveH47ZWYVYi2kKqcpEaSSG0yT6j0OW1BvWD8hbrvXKNe0KiHm64lAzaQ8Xi+EVyQj8pDtz7LcKcDkT6NmZC7XNDNKNb81WZJVn21TiphbBixVLsedMiA5JNu0iwxPx/0WHkXdbFJSeqb2UGy6Pakc4pTTZM9M5U7evo03pX05gu82SxOjNEbXkJQHNTgAoHDKbr3P+a9hd0noidHKizEH/FjxqzrNJtLcvXKXPPU9l0DS6qoOnjVeCw27CJQ== 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 CO1PR11MB4945.namprd11.prod.outlook.com (2603:10b6:303:9c::8) by BL0PR11MB3507.namprd11.prod.outlook.com (2603:10b6:208:7f::19) 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 09:02:58 +0000 Received: from CO1PR11MB4945.namprd11.prod.outlook.com ([fe80::6403:9220:63e2:574b]) by CO1PR11MB4945.namprd11.prod.outlook.com ([fe80::6403:9220:63e2:574b%4]) with mapi id 15.20.5144.029; Mon, 11 Apr 2022 09:02:58 +0000 From: "Wang, Jian J" To: "Chen, Gang C" , "devel@edk2.groups.io" CC: "Jiang, Guomin" , "Bi, Dandan" , "Zhang, Di" , "Gao, Liming" , "Dong, Eric" , "Ni, Ray" Subject: Re: [PATCH] MdeModulePkg/dec: update the PcdCpuStackGuard property Thread-Topic: [PATCH] MdeModulePkg/dec: update the PcdCpuStackGuard property Thread-Index: AQHYSvwUv2d84nkskkyZmgx7fqlkLazqb9CQ Date: Mon, 11 Apr 2022 09:02:57 +0000 Message-ID: References: <20220408035211.637342-1-gang.c.chen@intel.com> In-Reply-To: <20220408035211.637342-1-gang.c.chen@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.401.20 dlp-product: dlpe-windows 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: 6ecc6184-dde8-4f96-f97b-08da1b9a12c2 x-ms-traffictypediagnostic: BL0PR11MB3507: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: n8ok+P0RzpCQtf/hsmmg+nCzXa8VH882Pl5+Ab0hNiR1N48/YFwtFzskrD5QC8+KacdbzyhXb0gWy/CO2zpM7xpDFlJlL3AXB6gr1BqCxHftTkw2h4amkiAwTiyyijzcdtRIi3ZiQNjwheC9MBNYEKJUbw9xMzp2gLycrjEB4vTQdk3GH+crx11+caLwQqtYGBNjaa5skdOpSzzArOsunXfSV6IPZK01tYkYD/3En2+KNB0e6Ead3lwtQiLSSafTFwGxmiM96HTymP/B3LqfCjwyhQqvyIfyJzOCmShWjWiXhjbLN0DS2vwRlYRbfPI+r5yYT8duYH63zhK3zPLzLLbYvVkcNZ5sRcITw09NxGlGvnfumN8Gj5IMZyuiOWnHrmLdL7KRPz5ugdHAAt5S0tvW5i6F8GGVgNApJ+G7MuRzyhVk2Upgc0CoKmYVgYQaLKvRmTyzcUYLztVTaVHMdZcW9n7VhvIwcThMLH/41EZqnuLTR3kNjJ5lCwqXl1gZUL6OYLOF9N76//5GOsJobSMfGN5DaC+hNmJkksrQfTX78O+ceR5/aTFnKBm34awSwq5kF6d+zqcuX/ZxN3C76j5ygUjy2hAuyqvP1lT0YJsQvHa1hrGoJ61IhTsHDXd55GpRi8jGpDEJmTrzKc/GZcGNuyI6nEFq3C1QNC5Ia1UnCoXfyRX3noCSmBuCR0iCHBVFUaZTmAQl4zRvI73B+hhAvYXNYSDxT9+DHVRFnu2v+L+qEbXb52IEye9K5O+DIO9lYdZPekVrot1E0BgshOIXoOnWG2kQxcu/Spi3TMs= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4945.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(966005)(83380400001)(33656002)(15650500001)(8936002)(38100700002)(38070700005)(26005)(186003)(508600001)(5660300002)(2906002)(55016003)(76116006)(8676002)(4326008)(86362001)(64756008)(66946007)(110136005)(107886003)(316002)(54906003)(66476007)(66556008)(66446008)(52536014)(6506007)(7696005)(53546011)(82960400001)(9686003)(71200400001)(122000001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2pcfXvkLGS6Rx1pAJe8JwDFVgBrFJAtItBPYn7866m6xjBu8Ige1uwMxwN+Z?= =?us-ascii?Q?OP0Pzjz7OT6Awc3CJZKJfqRG+w1HTxypFbjFHkswtGmGm8Xpb75b4u2Uv1T9?= =?us-ascii?Q?YBac5pjfwkkiRfsvgqGJfyULSEc2+71zSsm+7PcnlCG1W+Nt5uzzCJeevLlU?= =?us-ascii?Q?YDcC2BTWYYhTkmEJsEUqmV+fhyefXWzuECn1Xtw7yAnXtK32abaN5YIthDmi?= =?us-ascii?Q?soveu8Pad9CR0Kxft6mDh/NjnqzHhZw/1UYLZyu4JPavQOZebDmjFkVKyYQE?= =?us-ascii?Q?k4KvP7QChFe3HjljPTbziBK1YTBz0KPIc3g5SPTF3rCQDPfV/goooA0IcVR1?= =?us-ascii?Q?Vs6BkihIQ/GFDBegjPOKL9f9TBIsissaJ7IBE87X7TzBYMJ+EyPl/8DtnuAG?= =?us-ascii?Q?XAtaKQ1huNqRD+ZUrSx1K+kZ7AKUo5qcLq8W/YMPJuSQ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7qnrrU0/S4Sy4J55vzNrl4VjD426LHOX9k84fqC6l9ZdoVWx?= =?us-ascii?Q?JIY/RnwvFa39KlJ6CGxk/HICFUpOhlQST9v1i9aQQlHkj069GZUx5AeKaudG?= =?us-ascii?Q?aGBtVJ024y96hL9k3TUDMh7aaXHc9aGAjEWtu4+/dRIqNKbXo7ttzztFyWU3?= =?us-ascii?Q?cfO2TXVqu8N1PIc9UL9KS6FLmVowOzLSL6SD0rKV6q6vKguomV55bsqO25zZ?= =?us-ascii?Q?fp+1p6HDhfdnkm4fMZxugfZJiphx9XQlw4Ph+h1zMyCtrew2tA/VjGGEdYzw?= =?us-ascii?Q?LUGkN5BS0R1kQbtEfOmv3oCcbL/MsSJuAYYa2TNBAv/KsVexwvOHhKpq27Rs?= =?us-ascii?Q?D8gy3GYsJat915NKdFbcNDmsbxZGKBzQLKQvDrZVpXhr9lWF0GMrELXPvn3y?= =?us-ascii?Q?BVmEiFRHUA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4945.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ecc6184-dde8-4f96-f97b-08da1b9a12c2 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2022 09:02:57.9089 (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: gW1W+c/4fkFtBnHSPDP3Nxq8h3im7uIS54PvhgF3AA9zoQxZXKwj+buw9hnN1w+jX9jhDvwlgDqA0phXuyWyEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3507 Return-Path: jian.j.wang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jian J Wang Regards, Jian > -----Original Message----- > From: Chen, Gang C > Sent: Friday, April 08, 2022 11:52 AM > To: devel@edk2.groups.io > Cc: Jiang, Guomin ; Bi, Dandan > ; Zhang, Di ; Wang, Jian J > ; Gao, Liming ; Dong, Er= ic > ; Ni, Ray > Subject: [PATCH] MdeModulePkg/dec: update the PcdCpuStackGuard property >=20 > Update the PcdCpuStackGuard from PcdsFixedAtBuild to PcdsDynamicEx. >=20 > Meanwhile, remove the duplicate check for PcdCpuStackGuard for > some limitation, which has been checked at the entry of > InitializeMpExceptionStackSwitchHandlers. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3897 >=20 > Cc: Jian J Wang > Cc: Liming Gao > Cc: devel@edk2.groups.io > Cc: Eric Dong > Cc: Ray Ni >=20 > Signed-off-by: Gang Chen > --- > MdeModulePkg/MdeModulePkg.dec | 14 +++++++------- > .../CpuExceptionHandlerLib/PeiCpuException.c | 2 +- > 2 files changed, 8 insertions(+), 8 deletions(-) >=20 > diff --git a/MdeModulePkg/MdeModulePkg.dec > 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|0 > x30001054 >=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. > - > gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|FALSE|BOOLEAN|0x30 > 001055 > - > [PcdsFixedAtBuild, PcdsPatchableInModule] > ## Dynamic type PCD can be registered callback function for Pcd settin= g action. > # PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum number > of callback function > @@ -2079,6 +2072,13 @@ > # @Prompt Enable PCIe Resizable BAR Capability support. >=20 > gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport|FALSE|BOOLE > AN|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. > + > gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|FALSE|BOOLEAN|0x00 > 010025 > + > [PcdsPatchableInModule] > ## Specify memory size with page number for PEI code when > # Loading Module at Fixed Address feature is enabled. > diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c > index 687fc4177f..bcd4175ffa 100644 > --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c > +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuException.c > @@ -254,7 +254,7 @@ InitializeCpuExceptionHandlersEx ( > // > // Initializing stack switch is only necessary for Stack Guard funct= ionality. > // > - if (PcdGetBool (PcdCpuStackGuard) && (InitData !=3D NULL)) { > + if (InitData !=3D NULL) { > Status =3D ArchSetupExceptionStack (InitData); > } > } > -- > 2.35.1