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.151873.1680760830467712996 for ; Wed, 05 Apr 2023 23:00:30 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=KaceLuDx; 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=1680760830; x=1712296830; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ifwDmcdL8GQIqrrihpMuJol+cWI1XJlohx/lPFV71E4=; b=KaceLuDxbYAHkS4nU3aVx/qOlombViJXbXJcFycs4U6XnychO4vBWwVD knwoFkvYgIH5OgMkh3T875Rt+7t+HpFZ/3G/wJ5WrUmxPNziSLb0embyN TtbN/oS4xtLW5pRSNK7qlQtmh7oW3fCS3H1VJu3Xgw4yndTGbfw+MJuu7 A3DA80xAgYX30oBtVIiXQBzbbCGrJNvew/3cCGd8SGtsb9sQ/5p+XkXHu OQ1ZSWu8frq9CPaEQPZvM5cDTFTmE0/nNu5thWMZBVI+WEYhGjRCCzVUw /i7dgyUkAesr5+7pZ+TI8tUdIjJkGJ28TIqVqTV6GtoDDdtOML2OTRGG0 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10671"; a="326689469" X-IronPort-AV: E=Sophos;i="5.98,322,1673942400"; d="scan'208";a="326689469" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2023 23:00:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10671"; a="756247778" X-IronPort-AV: E=Sophos;i="5.98,322,1673942400"; d="scan'208";a="756247778" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga004.fm.intel.com with ESMTP; 05 Apr 2023 23:00:27 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 5 Apr 2023 23:00:26 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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.21 via Frontend Transport; Wed, 5 Apr 2023 23:00:26 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Wed, 5 Apr 2023 23:00:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KkGvtuLBhuWZKEF6oVSn+ifCkLQ7WFDaDGtPpn7cy5v+D0MWuZj0r5V8ONNIAQmIzx45jDEJqbYhsiurbXu9PerFFYQ8nmHD2wdmEAHpqJiEYvXiIeEghjbUmtLVEqLhghlRljFu8P/dsMWDlXdgu14lhpljT9sY/cDJsmPBZletdZ6Ub7svlKEUlvvLhJBsCrSu/1/qfqtYIfCGIGGlih6ddrKCskPXxX5nBnKhSaXARXkW4ZZp1K29YLEItdjd1OZVVrxPSIxLJI+GS8tOBjJp6W0bzJvKUbq0wzePHMfiP6zoC+hNkeZg4EEZPQF3mqZNhKSBMdwUr26Gin9ETg== 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=YZNNPbikizP93H6hoUKQ+uEnMC3qgeaUvHZpQEO0d8U=; b=c24sT62nSEdKISCr1UWwt0HIwrn9/98TvAyYHnW1U6x4uqSR0UKqgutIiuM8zVLy2dAbAwk9QuWdmc76qsbJsozW2m4Cd4s3tXrahgz+Acyzql0uHxZsZX4N15X6KxCS7skqRpbvxKqxJPp3GJ2YHczLDup79/LOS382xJ+k+FI6+TAovsPuS0e1jgZNRLeF8xCC+OV61/LltSkK5m79VuHNWQxy16m4/tuQy/WMoGF3rDbhrIxv9/74RTg5DC5oPlHu+fQ570SrZk2ILgzNdx/7SjUPT5oiL1cEb8mIwduR9CyKMntvt4NT3E/K0TsZCheVM3ElxbLZAP5vG5/WdA== 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 PH0PR11MB4776.namprd11.prod.outlook.com (2603:10b6:510:30::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 6 Apr 2023 06:00:25 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::ae07:e96a:4a24:8a69%7]) with mapi id 15.20.6254.030; Thu, 6 Apr 2023 06:00:25 +0000 From: "Ni, Ray" To: Ard Biesheuvel , "devel@edk2.groups.io" CC: Andrew Fish , "Kinney, Michael D" , "Liu, Zhiguang" , Rebecca Cran , Tom Lendacky , =?iso-8859-1?Q?Marvin_H=E4user?= Subject: Re: [PATCH v4 3/6] UefiCpuPkg/PeiCpuExceptionHandlerLib: Use SEC/PEI specific asm component Thread-Topic: [PATCH v4 3/6] UefiCpuPkg/PeiCpuExceptionHandlerLib: Use SEC/PEI specific asm component Thread-Index: AQHZZjjCrq/M2Kwd+0y2BzhLBTOULa8dzb2w Date: Thu, 6 Apr 2023 06:00:24 +0000 Message-ID: References: <20230403142920.1921619-1-ardb@kernel.org> <20230403142920.1921619-4-ardb@kernel.org> In-Reply-To: <20230403142920.1921619-4-ardb@kernel.org> 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_|PH0PR11MB4776:EE_ x-ms-office365-filtering-correlation-id: 543ea403-a3c0-415e-768b-08db366436f8 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PUgay9IDXv5cfIXLMeSkjWOXbCIYFkJKveStacYQN2jyKhWPx+dNkK9hNpsTVv6jB0Lj/6U0DKsUXanhRD9eNNO1YUDc2r26p4iPh1jA8tiklbfTqZv40g8RGdK/XYC6FQBf7WplMssqTRUSUealsnqUuSZGP/Nm4hZNGhTaYS7/sScw9vxtzNj9zJs7W9OxBZGo8OFER4uxtDgwCImrQ5581+a9eaE+MWU/OQOfy2BEWzzBFx3QRyzJlu7d20g3c4vj9RpilEelxm0Ou7KCpHyjARWgS9h6YDAWGzvFJ/gC116UDstHOTyq7KzucMcqGroBg7W9OeYbJ9n6Xi4JU3nkGLWLnYMxFccVArxEZNOONNaAtFlU03JlnTvIjoeUEPe65Cs56jt0W5cYLBVyG0o3UZhFDnrrSnAl8G5zph4SLoXiZyfr4UQNwnJdtGR1xgOv5P+wuV5KvwlRFp42jqy5S5Bc65Wwy9h6YG+EDOeq4lNLYCykJZvGN3Cm8fZ3lQw0iMb9JUSGlS3x/kqJXczjIa0P6XRqMG66kZqg6Selq1GHZQuLU4r0UrlDOZziuVHp/tu8y8iCD0yPie+Pg5N5TOnB5NM8tJbhpoX5p+oTH1rLVqdEs9hmTEoGeN5bFKIMBgBJYzccT+VATdALsg== 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)(346002)(39860400002)(376002)(136003)(366004)(451199021)(6506007)(26005)(38070700005)(66574015)(9686003)(38100700002)(2906002)(83380400001)(66446008)(82960400001)(19627235002)(316002)(186003)(55016003)(64756008)(122000001)(53546011)(4326008)(110136005)(66476007)(5660300002)(41300700001)(71200400001)(8936002)(33656002)(66556008)(76116006)(66946007)(52536014)(86362001)(8676002)(478600001)(7696005)(54906003)(213903007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?eyZZ1Gh0+Nok/pKjDz534pbRshr5M04MNPplcmFkaIftBouXJ/Q0XpimVy?= =?iso-8859-1?Q?cyP/1naKJo1nBUKeWkeOk8ge3tVuvcrIlmLo45M7UA2uzVuaquNbZjYwKT?= =?iso-8859-1?Q?044vxn6ILG7uxmoPOaCYyCwdMaCLkls0gO0Fl+VImrXekJLpSHm5CEJj3I?= =?iso-8859-1?Q?B8BZ6GHcdE5tlWBPF2ANzhPthP+P6v0zQJGtwsJLK6ESCKpvkVdPGcD7T2?= =?iso-8859-1?Q?7UufrL/a/xWVdI7qppMj6qYLnkItySj0L7VwxgBRjT0EkoFaIrx2CkiQse?= =?iso-8859-1?Q?K3YgsVujtvAskf+zT8kHUX8ieLRouZLQySDBDusO6FSoT08D9xpxTPyWUs?= =?iso-8859-1?Q?BbFkyvsIZCg3klRWPCoGUiWb8IIRdl9DN66OUMmmU5IcROJNan40eRS1Oo?= =?iso-8859-1?Q?JeEkKWOWGilMfQiyVwoxWdGbpA4ucHH5dr8mgxH1rYQVCR9K5VsYK2eBX1?= =?iso-8859-1?Q?Owv0sUMWN3xeJ8ljc8HjNHZa64gF2rDsJrKvC+0evO+sjI23NuhVG0szjT?= =?iso-8859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SPYrUYL5ylQelDjD8si?= =?iso-8859-1?Q?frqFqc025hAfQp2suOgX40khWOI2hmXihXMiBcpCz5b3xsphd0C7vNJooi?= =?iso-8859-1?Q?fhUdXz5g6sCFZ/2talRY5yXtSQgJ5IJwmGp72/BsCP5iDkWFRaLAMUTnD/?= =?iso-8859-1?Q?+IY3YAwrxk/VjG3oWfDaa53PCWPaLJvZsbBlO26eMb86E1/teXHEr1A2c2?= =?iso-8859-1?Q?65ADRrvfJ4SAY=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: 543ea403-a3c0-415e-768b-08db366436f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2023 06:00:24.9408 (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: pkL+C8HWTeD9r57t9pHZThvSeBIu7ml1UHilKvKPhl0VzlXsUsQ1A73DcM0tC2yYE81svPNYvWyogV/OjESO/g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4776 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Ard Biesheuvel > Sent: Monday, April 3, 2023 10:29 PM > To: devel@edk2.groups.io > Cc: Ard Biesheuvel ; Ni, Ray ; Andrew > Fish ; Kinney, Michael D ; > Liu, Zhiguang ; Rebecca Cran > ; Tom Lendacky ; > Marvin H=E4user > Subject: [PATCH v4 3/6] UefiCpuPkg/PeiCpuExceptionHandlerLib: Use > SEC/PEI specific asm component >=20 > The PEI flavor of CpuExceptionHandlerLib never populates more than 32 > IDT vectors, and there is no CET shadow stack support in the PEI phase. > So there is no need to use the generic ExceptionHandler NASM source, > which carries a 256-entry template and CET support, and writes to its > own .text section when built using XCODE, which is not permitted in the > PEI phase. So let's switch to the reduced SEC/PEI version of this > component, which is sufficient for PEI and doesn't suffer from the same > issue. >=20 > Signed-off-by: Ard Biesheuvel > --- >=20 > UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.inf > | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i > nf > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i > nf > index 5339f8e604045801..3bcaff5c5fe4633a 100644 > --- > a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i > nf > +++ > b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiCpuExceptionHandlerLib.i > nf > @@ -28,7 +28,7 @@ [Sources.Ia32] > Ia32/ArchInterruptDefs.h >=20 >=20 >=20 > [Sources.X64] >=20 > - X64/Xcode5ExceptionHandlerAsm.nasm >=20 > + X64/SecPeiExceptionHandlerAsm.nasm >=20 > X64/ArchExceptionHandler.c >=20 > X64/ArchInterruptDefs.h >=20 >=20 >=20 > @@ -62,3 +62,5 @@ [Pcd] > [FeaturePcd] >=20 > gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackGuard ## > CONSUMES >=20 >=20 >=20 > +[BuildOptions] >=20 > + XCODE:*_*_X64_NASM_FLAGS =3D -D NO_ABSOLUTE_RELOCS_IN_TEXT >=20 > -- > 2.39.2