From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web12.11484.1660620458375140994 for ; Mon, 15 Aug 2022 20:27:38 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Tox/G5YY; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: bob.c.feng@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660620458; x=1692156458; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=llSvWTgKZuQsI4yJGrT2J4hypW0+7CaXxZRHq9BMslc=; b=Tox/G5YYIBtUOxSty3uLYBbdAjYJc7VGVSizidbBtg7NB45/9v963iDT lbYqaq9Lhu8SkVdxVelcCrzssaatQ0qUfzlPodFM9K9c2RhZZXPfbRDVs 8CV8dfoRb90rLB/NG8c5lLW2CqrgAimyAfXyeHlLPdLC1Z/zSEbKRKser IUT27pzQN0b7Xeu99lYxCVHEyuy5/EL+v+t8oFrKY3M0xmfXzYMjU+eeS 8Rv0MhTD50jJXWj2UmtOCsnMUrzkvb/05eEpqARYz525/NJ8AzCB/fjru k8rw9RXlTvAryEfNsD1/QDb1Gk0NekkfVjpDBVu6rlHMPATlMDXZQ6qsg Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10440"; a="378404378" X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="378404378" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Aug 2022 20:27:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="666924177" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga008.fm.intel.com with ESMTP; 15 Aug 2022 20:27:38 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 15 Aug 2022 20:27:37 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 15 Aug 2022 20:27:37 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Mon, 15 Aug 2022 20:27:37 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) 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.2375.28; Mon, 15 Aug 2022 20:27:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MF23rB1EYoLltazWMzx13dzqteRPU6YC6+ylXQ27fFEkOLi11BPaxsMgwIuFJdjy25aiJU9J76PEOsmTUlHceEBfb0NWJOtcvhsKQXBqPg412BLc7SkjMIfev0974PYn8MbruWZTzv4i5vPM5BYfTO/tHShFJay01uVx9NC3NT4ZufkjMcNZINzUkmuixzxyU47Q8K6tVZy10/YuhDvg/t+9TmQZzypwlnfzaNog5KHszLGNQD9g2pwuzpFF5VYPp/D/TU09Jbd0yAkKkfmhOr7+rtNR1nRNYC4eqhgD6OK+ZqL3crjgcFW6wr1cvEJtTe0bw2hO5DXv3P8ny/cRqg== 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=Po1YsRLgKvDyF/RzCmGylE6/WEmqOktQnQLKP1s4Qwg=; b=D9gcjuEPomflCcuQ9T8iPrTE8XZzwbzC59Et23g2YJkMabJULTgBWxt1Dh6YAUmjySNtWMPlejM6xNf40zPJ6lGsv+Xeh31Z6No0OBgSynGxMbPnYUMFB8MvxNw1qzxILyoLKKmiV+0cDJd23YOu/sYXFXM/MADWYdHORxyyLIqIZcgzC5RQnbS2nHaJqSmwswct7QehnkID79d2ax79QPWsuCzE0nJTL4hsdkMToqe0bHpZw4qSvRAA6uVPBmt8g112G0NZALDtfvr3VNBgDbToNCuwVtDitlO0rQtAoI05ytwE3ObzFSi3+wensXjO72mmM46+bLpc3/ckL9o31Q== 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 PH7PR11MB5863.namprd11.prod.outlook.com (2603:10b6:510:135::11) by BN9PR11MB5273.namprd11.prod.outlook.com (2603:10b6:408:132::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.22; Tue, 16 Aug 2022 03:27:34 +0000 Received: from PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::d8d8:f132:ab23:2494]) by PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::d8d8:f132:ab23:2494%3]) with mapi id 15.20.5525.011; Tue, 16 Aug 2022 03:27:34 +0000 From: "Bob Feng" To: "devel@edk2.groups.io" , "Kinney, Michael D" CC: Konstantin Aladyshev , "Gao, Liming" , "Chen, Christine" Subject: Re: [edk2-devel] [Patch edk2-stable202208 1/2] BaseTools/Source/C/GenSec: Preserve prior behavior when no GUID provided Thread-Topic: [edk2-devel] [Patch edk2-stable202208 1/2] BaseTools/Source/C/GenSec: Preserve prior behavior when no GUID provided Thread-Index: AQHYsRJ6uQak9CSKkEq8pS4q6bvDZK2w3f2Q Date: Tue, 16 Aug 2022 03:27:34 +0000 Message-ID: References: <20220816014928.2206-1-michael.d.kinney@intel.com> <20220816014928.2206-2-michael.d.kinney@intel.com> In-Reply-To: <20220816014928.2206-2-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action 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: c1c1340e-e53f-47a3-afd1-08da7f3742a1 x-ms-traffictypediagnostic: BN9PR11MB5273:EE_ 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: 2WeAHwrZD1QlwCfUPzS3Nlv5wza9lihO15NqXi+jeyWQ+y484vkT6V/QK5wsY/EvWDYZESjFkDZrafTVhLvsoBMndXjz4794nWZUKQIklFYPmt0/HpvWfcs2tNqLGcBJZGhzbYi+N0PyDqbrOF6+d/hhZu5ytpMKCB00bml4jQPAoi0sTjACJ1ZeG8yW1qPs8BmEftQf3Wi3n7IgxkJBBYIbvzETNLRnZ59BzCZ0p4CyeYvLmTaHCzuUdioh5YN8Si9QSCJtRWNn1NYDquMWdBqPjCf6ICxvG9rYh/tdVBA77iy0lsfAhFkzY+HDZF82ZVM6LpHsG/ZkirmINpbjJZUCW4kLEIyQUeaDWnFmiLJcCfwyieOX4UVh+JEfH/bORTWJUP9aPog/iCFTVVnliCPZjUIyPSYgBb5r37FeQWhJiEcNYOjFoUgPBSlp1X/8NdXcJYsACZz+vVvyj/eiJxD/5FEGmoY9qgLpO1oDEhYeKWbQ1h9/Mpn6SWzrp7J4fbf7wKI1zhNSDx4jzWZ6LHgvFXUNVwMBrmc7npfP5AqBzzddgc8Qu8YUGjwAq7FOeVlDrpRHoUO6z+LTGIISS/um2EggiqJOdlWszSZaOTtKSrHuFd8oDYeA+BMcgvK4EGFflcqI3VZb2/9wkBbztbANreJE7tkHBNRRqmsCHJRItJOBOeqPQv8ec/oA+MOVPI8eEi6S/eHcawRB+ArPciex/eFwQK0LuOrXBOo0/Q9bjTEjSL5ABBN9SpsgMZ1/TdziFjIFyQOAhPSNgsMpeBxN8RAowr6RYsy4jZ97qI7UvrxgW3f3uGOwy2hJegnC8X2i8SFALpF63E83KapYKPDisMDciHyTxu4Ecm8t/fCUuttBpzXWoarBD5REAXfY x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB5863.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(136003)(346002)(366004)(39860400002)(376002)(9686003)(316002)(6636002)(54906003)(110136005)(478600001)(41300700001)(6506007)(966005)(26005)(7696005)(66946007)(33656002)(86362001)(8936002)(71200400001)(55016003)(64756008)(66446008)(66476007)(2906002)(76116006)(66556008)(8676002)(4326008)(53546011)(52536014)(82960400001)(5660300002)(186003)(83380400001)(38070700005)(38100700002)(107886003)(122000001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?l+LMyQm7nOzV4oHRmqoXJq1fSjoiNd8JB1nuWCt6i0RwH+l0/94TkV1f67ab?= =?us-ascii?Q?fpY/Cy/bbzJYEdfumSVG08f8ipLPnyZ0irjjEzbvI1b+JjYGXfBxemSiqQ/g?= =?us-ascii?Q?xsTakUSZvn7AEwGLYFwYaEiIQN4kCvkRjsgUG58oK8sPgUP4WKZ7zTrqXkin?= =?us-ascii?Q?3NtFU+l6YhkN2utFHLk5VJ3Wa7PVESS3/FvUrNp7kxZ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7E3XDg5yj1Gon1tbmUNZfjRly3gjChxnE68yMt3V7X?= =?us-ascii?Q?gyOjVmC9Dj53YXUcVs0HjD8HQ/eCkKFO2ngcdhPxgRNMXSqjepjVovPYMT9m?= =?us-ascii?Q?c8k9UQqPcLphQ59eqiW7jkAdliGLd4W4GvjzlWHClmXOJhfCyCmmMPOwJsQ7?= =?us-ascii?Q?vhpgbA0ABWWNs2YE9vUa8Bhmkg9y00KzFWlpCZ0Y7HnJ+zSUpuQ009yljOOL?= =?us-ascii?Q?9uKjKtp9uk/eT7xX6tKv+MUi1s5iTMKD0AGD1RyCbjn3FUlEBzy2oqUn0VQK?= =?us-ascii?Q?6fxxrQfeS19ORsXtRA3tsayzt96J6i4mDmZ7s7RynZo9PsGg1Ak/1dvC3Bem?= =?us-ascii?Q?jef1GZJFG+H36SVFQMs5ZInGcODcKWcLl3/0J4LnfvzRbG2f1OXOFeO02avk?= =?us-ascii?Q?1HOzvRnDwSnnaFQ2znKSqzFcI8f4Q17wlq3LqAYct40jDSUJoyWFu+LYgH0/?= =?us-ascii?Q?KbxECCEe1dF7GcvsjRARuomkXtz+yPxhN1C5t7AR?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5863.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c1c1340e-e53f-47a3-afd1-08da7f3742a1 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2022 03:27:34.3855 (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: bsiKlduKxTI+a/E2c4QI0ktr3Hz4iCAMgK8i38P/GKd3i5PkgyxrHVIP+Ujv9+P8fwAmn6HKVl9C3RMCBp2g4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5273 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: devel@edk2.groups.io On Behalf Of Michael D Ki= nney Sent: Tuesday, August 16, 2022 9:49 AM To: devel@edk2.groups.io Cc: Konstantin Aladyshev ; Feng, Bob C ; Gao, Liming ; Chen, Christine Subject: [edk2-devel] [Patch edk2-stable202208 1/2] BaseTools/Source/C/GenS= ec: Preserve prior behavior when no GUID provided REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4022 If no GUID value is provided with EFI_SECTION_FREEFORM_SUBTYPE_GUID then pr= eserve the prior behavior until all downstream platforms are updated to pas= s in a GUID value. Cc: Konstantin Aladyshev Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Michael D Kinney --- BaseTools/Source/C/GenSec/GenSec.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/BaseTools/Source/C/GenSec/GenSec.c b/BaseTools/Source/C/GenSec= /GenSec.c index d86cc197cc26..191a49d99228 100644 --- a/BaseTools/Source/C/GenSec/GenSec.c +++ b/BaseTools/Source/C/GenSec/GenSec.c @@ -1752,8 +1752,7 @@ Routine Description: // Check whether there is GUID for the SubtypeGuid section // if ((SectType =3D=3D EFI_SECTION_FREEFORM_SUBTYPE_GUID) && (CompareGuid = (&VendorGuid, &mZeroGuid) =3D=3D 0)) { - Error (NULL, 0, 1001, "Missing options", "GUID"); - goto Finish; + fprintf (stdout, "Warning: input guid value is required for section=20 + type %s\n", SectionName); } =20 // @@ -1825,13 +1824,25 @@ Routine Description: break; =20 case EFI_SECTION_FREEFORM_SUBTYPE_GUID: - Status =3D GenSectionSubtypeGuidSection ( - InputFileName, - InputFileAlign, - InputFileNum, - &VendorGuid, - &OutFileBuffer - ); + if (CompareGuid (&VendorGuid, &mZeroGuid) =3D=3D 0) { + // + // Preserve existing behavior when no GUID value is provided + // + Status =3D GenSectionCommonLeafSection ( + InputFileName, + InputFileNum, + SectType, + &OutFileBuffer + ); + } else { + Status =3D GenSectionSubtypeGuidSection ( + InputFileName, + InputFileAlign, + InputFileNum, + &VendorGuid, + &OutFileBuffer + ); + } break; =20 case EFI_SECTION_VERSION: -- 2.37.1.windows.1