From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.1325.1590538342093461756 for ; Tue, 26 May 2020 17:12:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=T9JZFGnW; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: guomin.jiang@intel.com) IronPort-SDR: JFhnCD6nHsSQbKEvaRN+bDsO+MNEpUs+h6/ZyBVTNO5oP9KdlQmkOBgSypp55l9HhXr6wD4IJQ YuZIOvFqW7eg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2020 17:12:21 -0700 IronPort-SDR: cPro5Yx6q1EOXX3tLdvgUSF52OZ94wPXUsgE1jPr8CttO2GGk5+VcoKaypl1ugnIZ3N5PvANmP IAJd28/nxO+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,439,1583222400"; d="scan'208";a="302279159" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 26 May 2020 17:12:21 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 26 May 2020 17:12:20 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 26 May 2020 17:12:20 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 26 May 2020 17:12:20 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KW8+iltvgPxOU2dIfRqvxYOnr1y9rzqGqkyScyvqj0Q8C1NxbNgifKy3RKlGWTctg8H6HDIo+GBfiTft2oSThtCeVXrSf78SXCTWn1IrgzSEwQRpNuHwsVPEsxqZlS8If2eznU/I5p/P9YGoWz8iL0BoJ4/E33uusgY0PzjMnQKK3rf75SyymvdQAR5n+k6pzn/G01BiUl/Pi/fQuoEjiRQ5R82rIfJdLAFNTs1rLVC8ZwrQ6WFOyySRXMrPWbmIkBxNZSxiJgMXwPGrzIPkqWHr8LJivD+fpYmeZCEXlPT000kOn2qGKWKN8xEYhGoMRoYeDnKSw+eywPOWYRgCsA== 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-SenderADCheck; bh=DKxKevTFRbxrrYc8ujW01uGAjX/ZjPX9toM92JCjots=; b=dzvR77fYhPwgtKuAL69+AsO1LUR0pqChCEeQUTL4xE+o5EAX24I9aNFzy+Xn7QyQZkHfo0RHphwt7qsIlI4LlLn2wl5y4/7Nz9r5aBhMNGoHCU4xMPV7OfFwKDwynrx56P+Hl6d9kRdopQ3aho4D+r11b0GfLzOHraNswwMjxJ9NL0IExlTgVctpuXPbWD3j7ZNpRXWg3cQKHAuL1mHiodofafnzygeaUVfL3ySjupslucW6KlHk2EsIIGjrNEwa6QrK/qegrkfwgZiqPoTK6VR8Ny4c/8H60wEDBnyvUxVEEbRHyr6kz+1EJ4L6MdPy3UC6nfNQiacMYfip2QSCsg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DKxKevTFRbxrrYc8ujW01uGAjX/ZjPX9toM92JCjots=; b=T9JZFGnWq+j2jSl+Zh9lidCBZBZoPaQiPehngpFXi0vvud6lYIj3d0cMMNq7QWKlZeTE/tnMULwsc443iAvYnfVRk/3/YYsvx3RDMtqkBsXVaXIMrA38yKXIwneN/AVMVOnfWk7/qwyUOPlOS3JEzjhNx6WoxNTyFN9l2pMQv1I= Received: from DM6PR11MB2955.namprd11.prod.outlook.com (2603:10b6:5:65::31) by DM6PR11MB4692.namprd11.prod.outlook.com (2603:10b6:5:2aa::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.24; Wed, 27 May 2020 00:12:19 +0000 Received: from DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::ccd4:4b0d:535a:58be]) by DM6PR11MB2955.namprd11.prod.outlook.com ([fe80::ccd4:4b0d:535a:58be%7]) with mapi id 15.20.3045.016; Wed, 27 May 2020 00:12:19 +0000 From: "Guomin Jiang" To: Ming Huang , "devel@edk2.groups.io" , "Wang, Jian J" , "Wu, Hao A" , "Gao, Liming" CC: "lidongzhan@huawei.com" , "songdongkuang@huawei.com" , "wanghuiqiang@huawei.com" , "qiuliangen@huawei.com" , "shenlimei@huawei.com" Subject: Re: [edk2-devel] [RFC edk2 v1 1/1] MdeModulePkg/Variable: Move FindVariable after AutoUpdateLangVariable Thread-Topic: [edk2-devel] [RFC edk2 v1 1/1] MdeModulePkg/Variable: Move FindVariable after AutoUpdateLangVariable Thread-Index: AQHWMsFvbq6pcyHFpESN4fR/yKH0Yai5hQ8QgABdgYCAAS2wUA== Date: Wed, 27 May 2020 00:12:18 +0000 Message-ID: References: <1590406458-59742-1-git-send-email-huangming23@huawei.com> <1590406458-59742-2-git-send-email-huangming23@huawei.com> <0d23e61f-3126-bf7d-f370-7db6ad22a7b7@huawei.com> In-Reply-To: <0d23e61f-3126-bf7d-f370-7db6ad22a7b7@huawei.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.52.196] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1293ca72-b545-4e4b-76ec-08d801d29eb7 x-ms-traffictypediagnostic: DM6PR11MB4692: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 04163EF38A x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Oo+Gs3qhu8wVGUYn+t4FN9xb/HJE5hC5Q+KQRDotIErPmXt8vaXVwbgTAWTSjPpsIUbINOPmOfa+tM2J2xidVKfpN+bA/pPd7sdMvSHCeGgShnQL7Dx36Bf8HT+J3I2fPkWGk/paC+qFVhieBtO5YRw4j8EUKo6d9jcPkdpTCH4umL0jqqYTDHvYN90GjcednJoxnWxhUpoR0fp1gNWnDJj3rJtjC/KhPTcaXdbs4QOlbJ7TQwV+NsaelBGdTwRV7qK6hhS3l4y4dZ27Xx/nfrh+sObuai/iCnHVY9EFk0HYfUdHOFKY01+PtHe4lxOd5X/Wd+h9crwYPIe3HBQ2lpL7R1j07pegJW8TonKy+d7yNTWaGAC5MPgk/xQDD5tjd7HK3X1BRRV/0/u4OurnAw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB2955.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(136003)(396003)(346002)(366004)(39860400002)(376002)(2906002)(186003)(76116006)(6636002)(110136005)(66446008)(66556008)(66946007)(316002)(8936002)(64756008)(8676002)(66476007)(4326008)(83380400001)(26005)(71200400001)(52536014)(5660300002)(54906003)(478600001)(966005)(7696005)(9686003)(53546011)(6506007)(55016002)(86362001)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: lYEDJGw6SYe9/HSXTJC1cp1L8LnfxkZ38wk5+KZrLTAaXMIN4dZU6YaKBx0fwP1W0ctQRVq6IevGrkSxkUisp/dsgpzYs78SnVkopF3V02INlZoO3sgibs4v3wViQ5avhG/zVfY0SUgDVJN5mJ82hNrCTiLBght2djz2I/al8Zyi9W1evxPFKuO3jhonUGD4Crd1PB9ZaILtrpnIRUzUFq2TgIVQb5TFX4UO/pZkkjPjosOiB7HeFI86piSTTfWTeJrIeyUqo1XavQRuqM/O2JGoMJigPAHX0ocHTaKaGjWDNdcL5PQvKNck8XUGTw/sMZnCJWn2NdqrwV6FQs9DMEZDdzwh+7j9qkUiMCpch7dlDr3BCpBldteCna2w7o4NucoXcCv0mk8a1whX0H0HIIsv3POjcFsIcL1hO1nR+l5Fhq7XGIID9BssS3hankI1GK7a3qm4Z7ev4FwgLqwpoY5p9F2JWsOR4h6LDnE8gznwpxsgIfXwPPKcFs/YfIkC MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 1293ca72-b545-4e4b-76ec-08d801d29eb7 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 May 2020 00:12:18.9319 (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: cOdn14+/MBvMCg6QjNGXW1WaE6DLCcdtTZICPxr28VaP8bXcp8O5YYC0jcgV+TS0T0AWIBRsTepZb3OYAFcUbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4692 Return-Path: guomin.jiang@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Hi Huangming, I will clarify it when I am free, please be patient. If it is urgent for you, I suggest that you can use your patch temporarily= . Any other thing, I check your patch in the mail, it seem that not any chan= ge in code, can you double confirm it? Best Regards > -----Original Message----- > From: Ming Huang > Sent: Tuesday, May 26, 2020 2:08 PM > To: Jiang, Guomin ; devel@edk2.groups.io; Wang, > Jian J ; Wu, Hao A ; Gao, > Liming > Cc: lidongzhan@huawei.com; songdongkuang@huawei.com; > wanghuiqiang@huawei.com; qiuliangen@huawei.com; > shenlimei@huawei.com > Subject: Re: [edk2-devel] [RFC edk2 v1 1/1] MdeModulePkg/Variable: Move > FindVariable after AutoUpdateLangVariable >=20 >=20 >=20 > =1B$B:_=1B(B 2020/5/26 8:39, Jiang, Guomin =1B$B > Hi Huangming, > > > > I am taking the bugzilla and I am sorry that I haven't provide you wit= h > productive comment. > > > > I am still busy until August. > > > > I just want to know that: > > 1. Have you verified that the symptom will disappear after invoked > FindVariable() function? >=20 > Yes, the symptom will disappeare after add this patch. >=20 > > 2. Is it your suggestion that the FindVariable() need to be invoked bu= t you > have no idea that how to fix it? >=20 > This patch can fix this issue, and I guess this issue was resulted by ad= ding > AutoUpdateLangVariable feature. > I hope this patch can be merged to edk2 master. >=20 > Thanks > Ming >=20 > > > > Best Regards > > Guomin > >> -----Original Message----- > >> From: devel@edk2.groups.io On Behalf Of Ming > >> Huang > >> Sent: Monday, May 25, 2020 7:34 PM > >> To: devel@edk2.groups.io; Wang, Jian J ; Wu, > >> Hao A ; Gao, Liming > >> Cc: lidongzhan@huawei.com; huangming23@huawei.com; > >> songdongkuang@huawei.com; wanghuiqiang@huawei.com; > >> qiuliangen@huawei.com; shenlimei@huawei.com > >> Subject: [edk2-devel] [RFC edk2 v1 1/1] MdeModulePkg/Variable: Move > >> FindVariable after AutoUpdateLangVariable > >> > >> When occur reclaim in AutoUpdateLangVariable(), the CurrPtr of > >> Variable is invalid. The State will be update with wrong position > >> after UpdateVariable in this situation and two valid PlatformLang or = Lang > variables will exist. > >> BmForEachVariable() will enter endless loop while exist two valid > >> PlatformLang variables. So FindVariable() should be invoked atfer > >> AutoUpdateLangVariable(). > >> > >> https://bugzilla.tianocore.org/show_bug.cgi?id=3D2667 > >> > >> Signed-off-by: Ming Huang > >> --- > >> MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 26 > >> ++++++++++---------- > >> 1 file changed, 13 insertions(+), 13 deletions(-) > >> > >> diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > >> b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > >> index 1e71fc6..0cec981 100644 > >> --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > >> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > >> @@ -2741,6 +2741,19 @@ VariableServiceSetVariable ( > >> mVariableModuleGlobal->NonVolatileLastVariableOffset =3D (UINTN) > >> NextVariable - (UINTN) Point; > >> } > >> > >> + if (!FeaturePcdGet (PcdUefiVariableDefaultLangDeprecate)) { > >> + // > >> + // Hook the operation of setting PlatformLangCodes/PlatformLang > >> + and > >> LangCodes/Lang. > >> + // > >> + Status =3D AutoUpdateLangVariable (VariableName, Data, DataSize)= ; > >> + if (EFI_ERROR (Status)) { > >> + // > >> + // The auto update operation failed, directly return to avoid > >> inconsistency between PlatformLang and Lang. > >> + // > >> + goto Done; > >> + } > >> + } > >> + > >> // > >> // Check whether the input variable is already existed. > >> // > >> @@ -2763,19 +2776,6 @@ VariableServiceSetVariable ( > >> } > >> } > >> > >> - if (!FeaturePcdGet (PcdUefiVariableDefaultLangDeprecate)) { > >> - // > >> - // Hook the operation of setting PlatformLangCodes/PlatformLang = and > >> LangCodes/Lang. > >> - // > >> - Status =3D AutoUpdateLangVariable (VariableName, Data, DataSize)= ; > >> - if (EFI_ERROR (Status)) { > >> - // > >> - // The auto update operation failed, directly return to avoid > inconsistency > >> between PlatformLang and Lang. > >> - // > >> - goto Done; > >> - } > >> - } > >> - > >> if (mVariableModuleGlobal->VariableGlobal.AuthSupport) { > >> Status =3D AuthVariableLibProcessVariable (VariableName, > >> VendorGuid, Data, DataSize, Attributes); > >> } else { > >> -- > >> 2.8.1 > >> > >> > >>=20 > > > > > >