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.web11.4279.1685675819116598541 for ; Thu, 01 Jun 2023 20:16:59 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=j9IzlkVb; spf=pass (domain: intel.com, ip: 134.134.136.126, 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=1685675819; x=1717211819; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=F2K6G2H0i6xvLvmQmCmeooU+apkiuAnTPpj5uVtWBXc=; b=j9IzlkVb/mWnm3iHTsyO3mHdolUAmVUw/mG1Vl6bwwlRjnjgvgdOfijT x41h/n74Pqb3hGRzkOkyb1jTQleoz8mIHbYATzYsNKcYXeRx0bBhr/kKQ uxOu/FC4svDZFbHqJbAe/x16Gj8v4lMg9zWl/edbqNm2klS+EPTZ5bAUV DvOqkMZ+h7pg/6Cx0OXtE8j/yLc9ywvpDXP6/3hrmgduc7pBcinnW8bAT JrevzkI5p1aEAVpV/S9N3ujwLh9s4MwqVgfyr4wXUcGfOnp4Eeq/QlXrr ltJ6DuP5tPbyW17KO+DuGQTU+qZkbq5qnP4TBaFByv716RaVOgOWAaEuq A==; X-IronPort-AV: E=McAfee;i="6600,9927,10728"; a="340378741" X-IronPort-AV: E=Sophos;i="6.00,211,1681196400"; d="scan'208";a="340378741" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2023 20:16:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10728"; a="658063895" X-IronPort-AV: E=Sophos;i="6.00,211,1681196400"; d="scan'208";a="658063895" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP; 01 Jun 2023 20:16:58 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 1 Jun 2023 20:16:58 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) 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, 1 Jun 2023 20:16:58 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) 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.2507.23; Thu, 1 Jun 2023 20:16:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oGlYuZpbIzVaadBWCoG7DvSJLvus8trxNJgr8aya3jwyAzAQwwDysryfRQUKbuRkVvJLdcDBS3nAxmlOI4yh0rd6m/+aC6CurTPA8ay6EB2MAcY8hfbWqniviRkxTLVS3VEDxj5nAoM6441GVIi6FXhY2wgiBDQ57qQXXTg3ZGA0TMqEpm4hdjm7bfeKh3USY2IoNknWp7GI3g9EZRq5YRWjIUd2k46zNMTjx9JcDczI4S9CluEI+9srD8RL/mdxOFW8PpGcV97LMj/gm3yYjEYD5mZ3t5IC3Uknb1NqDQa/tuWRvk3ek4QPELjHLiO8U8xIycfvKc/EW5OTxMnViA== 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=pErFNontDQrDI7kfuVDA7BD2RGPFNw7nHfVz/pntWng=; b=XefbRoSloEbIko4Q01qr15Mf7f0a746Fc6GuawENN6qZpBzhIfXAp4gf9A/12tuzDdX/RO+Odt4R2RAPELCu4H63qm02ESkjN40WEd3jOvRw97gV+xJG1dIiL3dtCk6HlxSN9t6YQZ4eVtlcAhBGTogvrSqgWP9aS0jD3wWDLLbFlARrPMwL6R8HYwDXPMhtPV0RhREcAUfOZzjPYdLR+KCQHkrQ/tI0+nLel4IRKghuXFwZgOQIdyoVG07r6yM65KZx6//FePqUezcodS8lBhcjp+k2RCc5NEBCoEPorQBpjN7qsMmXi7/r7ic9CL9BfifYLc7h2UT+LyxGYmvizA== 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 PH7PR11MB8123.namprd11.prod.outlook.com (2603:10b6:510:236::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.22; Fri, 2 Jun 2023 03:16:55 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::892b:b8e6:bab7:635d]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::892b:b8e6:bab7:635d%3]) with mapi id 15.20.6455.020; Fri, 2 Jun 2023 03:16:55 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Tan, Dun" CC: "Dong, Eric" , "Kumar, Rahul R" , Gerd Hoffmann Subject: Re: [edk2-devel] [Patch V4 09/15] UefiCpuPkg: Extern mSmmShadowStackSize in PiSmmCpuDxeSmm.h Thread-Topic: [edk2-devel] [Patch V4 09/15] UefiCpuPkg: Extern mSmmShadowStackSize in PiSmmCpuDxeSmm.h Thread-Index: AQHZh91azbSB1Uw0J0OwAsH423Jv76928WZQ Date: Fri, 2 Jun 2023 03:16:55 +0000 Message-ID: References: <20230516095932.1525-1-dun.tan@intel.com> <20230516095932.1525-10-dun.tan@intel.com> In-Reply-To: <20230516095932.1525-10-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_|PH7PR11MB8123:EE_ x-ms-office365-filtering-correlation-id: c3fc9914-3a3c-4405-6c04-08db6317d1a0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kEa4D6Q0UNLSCAKAOOwUcgQTE8ihbYq1gK3YWTCLVk8s3i5s1ns/f99JZTLbl4r2/0ouIKPkc4U1DhfIVqrUp8kvjdih5eQ07NyTbdJdv2QzSnDpRbCGBtsTDCu2BQfXs75qNBBxj0UM12iT0yXOhRVysw45bVxe2eMnZIajzeB7t8tzWJ27FVX2osKvUymtz7bFGXmxN/2Aru1Dq/9EzE9E4bdWxN7BgjMAqqOMxfhbDf6MPSrrgPIShMh9Lr5Xhn0svBlvx9kpx/J/BFMrW4gJtJvgY28NMXsa8AukUx2/YLE4rMQx00wWRZxMGSMUT1ctMht7FedRrUBm7Qx3JVpt6DvcKQYWS2cikDlSmnMR+YBoeSDcTTQ8DcmhTo4MriEj2HN+hIMLGSHdGKp74CZ4bGU9P2o/nztA16R77RLL62IGxOsNs/b6ZEXsCNQ9FlqbPBt/RdOr32lrjKzOlESmwUOPSGAykuObBCGi5YcoG72kPCIRJ7t7V1kCRKllOuDLjUlWju4VoYZFwHAq5tu1ojOyQHeca1CrEJ4FNaxxQeg36bWzKvnr4vL0Pju/85+9CxMPPw+r1FXgtKVDK1WHOn0YWQFJr8v82Wj+mEmvlkgt/2Cy4GVoNHUnHcdsoMHgomTzsiE++/yUQHMpNoayVjdvSMT/QGt2Ocuv59Y= 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)(6029001)(376002)(39860400002)(366004)(346002)(396003)(136003)(451199021)(110136005)(54906003)(38070700005)(19627235002)(76116006)(66446008)(4326008)(6506007)(26005)(966005)(83380400001)(122000001)(316002)(86362001)(82960400001)(66946007)(478600001)(66476007)(66556008)(64756008)(2906002)(6636002)(52536014)(33656002)(5660300002)(41300700001)(71200400001)(66899021)(186003)(7696005)(55016003)(8676002)(38100700002)(8936002)(9686003)(53546011)(145543001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?E1SLTZat0C9AtTh/+rnhm9XYlX16IJ9dL5MlStLJnhYyWpSp6mCOFpfJXEug?= =?us-ascii?Q?yQeS6OSJ8s/ofokBZdNH8vekqKMJ0QyGPBFiRFPPpfhfVcv7jpmvHwpO+05t?= =?us-ascii?Q?YRcPKYKHXjWeTSAYG2dTL4Ad5SfIS2D7/tBHdsHA3b/WnvQgri+NG2opAu4L?= =?us-ascii?Q?sxeZsIHatWHuVLLFlyDpVJg2qYZEGi+2QzK4wIS/53ajK6UKiOljg4vGFxaR?= =?us-ascii?Q?evTWaibPPw+jhxJNO5eCNpt4o+ulQskw9gfFPCJA6kDSrSmWUGxdnUYPFtCU?= =?us-ascii?Q?CRGRCRAPelYajXW5S/vRGIfimimFpcx3AN1/ZZ0BL7hdOPNUkwd90J0iz2rQ?= =?us-ascii?Q?nqjDY0eq0jHVY82DBKLDpWdcXGQCyunkstYIGs3v3wbquHhBqkFFAJh95zOv?= =?us-ascii?Q?9EniBtK7Vt1VMJueLuyGsAKCLW9ig3lyHJd6vBzdD9ejkP4WvL4q1YwcqP4A?= =?us-ascii?Q?v4QlrV/aGNA03tSQtWG48dEm8JyPjxbaoL9wooZ29VO2UC68xRBFw9IR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WJ4gvQJ+p5334UpkoADsvc8c8gzbXZubfmLmxVrApDxxNLZy2D?= =?us-ascii?Q?k6CPqqXhdPyjFwnHjoStWOmNHS6LYAhX8/C9ZZmADTVxvXwrn/LyBV+cC5kp?= =?us-ascii?Q?fAQegnjYu+uKIp5IRvygWQ/BJg8as6Ghzv7qgg4wGYBuwFUu6qwvQp0QKGuk?= =?us-ascii?Q?wteleC/1XIvJ3ggZiOw=3D?= 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: c3fc9914-3a3c-4405-6c04-08db6317d1a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jun 2023 03:16:55.5296 (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: EinQHKtbksqJaK0CCHqhDUCeSBQKHMRGd2zn6gTxr1DVJlzGWPp/rRel61ISCcZDM8DDhhJ8h97hQdN4cgqf/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB8123 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 You removed all "extern" and added one "extern" in PiSmmCpuDxeSmm.h. But, where is the mSmmShadowStackSize defined? No link error? > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of duntan > Sent: Tuesday, May 16, 2023 5:59 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Kumar, = Rahul > R ; Gerd Hoffmann > Subject: [edk2-devel] [Patch V4 09/15] UefiCpuPkg: Extern > mSmmShadowStackSize in PiSmmCpuDxeSmm.h >=20 > Extern mSmmShadowStackSize in PiSmmCpuDxeSmm.h and remove > extern for mSmmShadowStackSize in c files to simplify code. >=20 > Signed-off-by: Dun Tan > Cc: Eric Dong > Cc: Ray Ni > Cc: Rahul Kumar > Cc: Gerd Hoffmann > --- > UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c | 3 +-- > UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 2 -- > UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 1 + > UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c | 2 -- > UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c | 3 +-- > 5 files changed, 3 insertions(+), 8 deletions(-) >=20 > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c > index 6c48a53f67..636dc8d92f 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArch.c > @@ -1,7 +1,7 @@ > /** @file > SMM CPU misc functions for Ia32 arch specific. >=20 > -Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
> +Copyright (c) 2015 - 2023, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -14,7 +14,6 @@ EFI_PHYSICAL_ADDRESS mGdtBuffer; > UINTN mGdtBufferSize; >=20 > extern BOOLEAN mCetSupported; > -extern UINTN mSmmShadowStackSize; >=20 > X86_ASSEMBLY_PATCH_LABEL mPatchCetPl0Ssp; > X86_ASSEMBLY_PATCH_LABEL mPatchCetInterruptSsp; > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > index baf827cf9d..1878252eac 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > @@ -29,8 +29,6 @@ MM_COMPLETION mSmmStartupThisApToken; > // > UINT32 *mPackageFirstThreadIndex =3D NULL; >=20 > -extern UINTN mSmmShadowStackSize; > - > /** > Performs an atomic compare exchange operation to get semaphore. > The compare exchange operation must be performed using > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h > b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h > index e0c4ca76dc..a7da9673a5 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h > @@ -262,6 +262,7 @@ extern EFI_SMM_CPU_PROTOCOL mSmmCpu; > extern EFI_MM_MP_PROTOCOL mSmmMp; > extern BOOLEAN m5LevelPagingNeeded; > extern PAGING_MODE mPagingMode; > +extern UINTN mSmmShadowStackSize; >=20 > /// > /// The mode of the CPU at the time an SMI occurs > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > index a25a96f68c..25ced50955 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c > @@ -13,8 +13,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #define PAGE_TABLE_PAGES 8 > #define ACC_MAX_BIT BIT3 >=20 > -extern UINTN mSmmShadowStackSize; > - > LIST_ENTRY mPagePool =3D INITIALIZE_LIST_HEAD_V= ARIABLE > (mPagePool); > BOOLEAN m1GPageTableSupport =3D FALSE; > BOOLEAN mCpuSmmRestrictedMemoryAccess; > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c > index 00a284c369..c4f21e2155 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArch.c > @@ -1,7 +1,7 @@ > /** @file > SMM CPU misc functions for x64 arch specific. >=20 > -Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
> +Copyright (c) 2015 - 2023, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -12,7 +12,6 @@ EFI_PHYSICAL_ADDRESS mGdtBuffer; > UINTN mGdtBufferSize; >=20 > extern BOOLEAN mCetSupported; > -extern UINTN mSmmShadowStackSize; >=20 > X86_ASSEMBLY_PATCH_LABEL mPatchCetPl0Ssp; > X86_ASSEMBLY_PATCH_LABEL mPatchCetInterruptSsp; > -- > 2.31.1.windows.1 >=20 >=20 >=20 >=20 >=20