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.2829.1590625743536161140 for ; Wed, 27 May 2020 17:29:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=EdFdXIqL; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: guomin.jiang@intel.com) IronPort-SDR: BQMLTB61XudkSGZxbcW3UjK9zNGbbYSaROivj2ORbx5DE+OCsKuyVrZL4qE0QGEn1vzFJae7H4 YZ7zJpr002qw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2020 17:29:02 -0700 IronPort-SDR: qYfqVzVEizRE40pB7QU/H0Z/AJTj8vs+uNIbNoTpyo6z3/2JwpMrckWU4W5pNAxsQbr1NBzWPl XWx728xc4R7Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,443,1583222400"; d="scan'208";a="284988190" Received: from orsmsx109.amr.corp.intel.com ([10.22.240.7]) by orsmga002.jf.intel.com with ESMTP; 27 May 2020 17:29:00 -0700 Received: from orsmsx125.amr.corp.intel.com (10.22.240.125) by ORSMSX109.amr.corp.intel.com (10.22.240.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 May 2020 17:29:00 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX125.amr.corp.intel.com (10.22.240.125) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 May 2020 17:29:00 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.51) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 27 May 2020 17:29:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ENeJbuNKh6rCP+fdAFUC9ULps9ldFUdb3wo/7cu8n79VT2k1BBLcRwIgWVy92gOVL0hIbUQvMi4zvv538ePMF5W5+43UI9jSURbjaT6MCSZtava1rWAFCait72JXRy3n+kFU+bvKYQZ4O3np930sUV+eFZUNgLs2w5ef1CB4zOf7YexX+O/kucUDC2bxfTVx2LdibQL+27NbZPNMKTxmlh7gxZIXw0nK49xnwjj58X8qWJNjWyKx3GkCgHqo/D15B2TB/XuXynoU3BNgKq9P6jEK1RGbl2Bn8CM3djUS4WUMOm5GgbgCPkYsQe6Uypt5sl/9uO8b3d7UnR3Xonrahg== 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=uQwNCbtjdIgBkVqBSascqCou7wUsD52GyGxT4NVrMKc=; b=mKUVkCmeFu6TasC9d+AxDtasMRCB86tpYfLqaKUqTfKsdTV3MLq/b9Cej8htLwPTh7Nqm1xhrcedrbv1YwN0LZHpVdeAIAmlU4Z5ccVDNRflEeXakIfHMAz8ocOzM4KDmT4RS9DjdZ03agtJEM645y7d4NF5ie7PkSWk0njRtFfq/0eulvz2+vx0vX2bsdXIqRRg8ubKHSk2v4/tOSmbm6A3wA0ZzQJGs71GA6U0rxvFVGO7m5yF4+ZRcjRjTi+xycHM8NkyD79SAtlwy5qg1wbgb/T6d9Ese6o6oT2F0AVoJUyeG/uYoNpK1wX9brKQjjg/TqCq8WColH1zhKv5hw== 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=uQwNCbtjdIgBkVqBSascqCou7wUsD52GyGxT4NVrMKc=; b=EdFdXIqLelOuc3VO4RT2/qqeyizo6ZvlrMSCse859a669CvSDHoluVHdZIRZK/rHs5f5wh7EoBSi4YXPMEMJ8f8bDindSQWMHOr3hkcbJX+pWEKqyfMglK2MtoeWqLIvFkAs9iEE2iRaUZ8qg0766uh2Esp1+DI0NUGzn9MazDY= Received: from DM6PR11MB2955.namprd11.prod.outlook.com (2603:10b6:5:65::31) by DM6PR11MB4027.namprd11.prod.outlook.com (2603:10b6:5:199::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.18; Thu, 28 May 2020 00:28:58 +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.018; Thu, 28 May 2020 00:28:58 +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/yKH0Yai5hQ8QgABdgYCAAS2wUIAA87WAgACkPCA= Date: Thu, 28 May 2020 00:28:58 +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> <394ac7a5-7010-f8d0-62f8-fa51f807af8d@huawei.com> In-Reply-To: <394ac7a5-7010-f8d0-62f8-fa51f807af8d@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: c27d661f-7ddc-4f87-a8b3-08d8029e1d02 x-ms-traffictypediagnostic: DM6PR11MB4027: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0417A3FFD2 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: he2rs8xmmp+q3pcbKfvdyPYDHOYgtw82MjIOWDLXaeqPwl6gMByatusC6ex/73Q7We2YQnFlzkSRY8jsWTPocnxhePJbraoaAFejfqE4P00H5bzppv8WkoQ9KJYKpI9sKw09hJ6Bn2cHCSDnpyY25k/klJSthoct4rEll2z4td+ag1UEf5g8Bjvp+e65vv7moi71Smc8oY/acBvsWNIGyjGoeeqjLWVJCalNvhq1Vk90q82uav4G7RXiMlEaheJHtBKgkDOk4BEJLmeec+pBkFhbpQFSo1wwEJL+z/IajBtTYikChda2pU+0ExYfXle2lZLxB4TGoddr6IWfW8ssB7CbK9TtsnhaATSCN4NZ5PF7XNDKA/PYwLrupqVxkcu04NCVz09B9reEFpmCO98CPQ== 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:(396003)(136003)(39860400002)(346002)(366004)(376002)(6506007)(53546011)(966005)(2906002)(110136005)(8676002)(316002)(9686003)(478600001)(54906003)(86362001)(33656002)(52536014)(71200400001)(66446008)(64756008)(55016002)(6636002)(76116006)(66476007)(66556008)(26005)(7696005)(4326008)(186003)(8936002)(5660300002)(83380400001)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: sWQKbG2Z0F5Xc0OUSMse6+A9+t0i7fWpjOKNMKaUrWVUhzMrY7+cy3kGgRev3r4Cgz6eA1TtpdKh/Qhmkhz1MQu6iqWaNglJPKQZhRt7tR0Yspt/fyE7GqPL4HLbiFPD52WoKwg0rTTb+dekXjS92NC29HlJ6cDld2sWMJqLjsmSBODRdSUA3uaap+PtY1Rx/w+JwXCeTY+oASQhok4DC8rJmgltJuKv8k6a2SGFf8VKxZ99jomKxn+UYDPpjLBnl7LvWuut00AFAxjpsrvtkaNjAOEBpfYP1NrXdEi2e58zkAz7g27W5VfTaQZDABdY+prpq8aC3KYoMfFJJS7LHqpr74fRX/5CW17g20craouNCewEayax/vQXm0RNGSGXdHSnHdXhaycaOBefVtTYD1Dw+rZmNKkIoQDrUmWPH8fHA4lyxeeR9PMSk1BYXHdfvoKS2aodUFSgnGb7yVy6xV+rV5M0hC6kckt8RI5JmSk= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c27d661f-7ddc-4f87-a8b3-08d8029e1d02 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 May 2020 00:28:58.5868 (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: 8A2/8MxsuPqbR7JPEFgBQ/sO9asIJDfvEaDVsVqQD9+uX9D8MoEbbxWipIi8H5PVu39qmd7gJjD1edsLBZEIAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4027 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 double check it when I am free. > -----Original Message----- > From: Ming Huang > Sent: Wednesday, May 27, 2020 10:40 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 > Hi Guomin, >=20 > This patch change the position of invoking the FindVariable() function t= o after > AutoUpdateLangVariable() invoked. >=20 > Thanks, > Ming >=20 > =1B$B:_=1B(B 2020/5/27 8:12, Jiang, Guomin =1B$B > 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 tempora= rily. > > > > Any other thing, I check your patch in the mail, it seem that not any = change > 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 > >> > >> > >> > >> =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 > >>> with > >> 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? > >> > >> Yes, the symptom will disappeare after add this patch. > >> > >>> 2. Is it your suggestion that the FindVariable() need to be invoked > >>> but you > >> have no idea that how to fix it? > >> > >> This patch can fix this issue, and I guess this issue was resulted by > >> adding AutoUpdateLangVariable feature. > >> I hope this patch can be merged to edk2 master. > >> > >> Thanks > >> Ming > >> > >>> > >>> 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 (UINT= N) > >>>> NextVariable - (UINTN) Point; > >>>> } > >>>> > >>>> + if (!FeaturePcdGet (PcdUefiVariableDefaultLangDeprecate)) { > >>>> + // > >>>> + // Hook the operation of setting > >>>> + PlatformLangCodes/PlatformLang and > >>>> LangCodes/Lang. > >>>> + // > >>>> + Status =3D AutoUpdateLangVariable (VariableName, Data, DataSiz= e); > >>>> + 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/PlatformLan= g > and > >>>> LangCodes/Lang. > >>>> - // > >>>> - Status =3D AutoUpdateLangVariable (VariableName, Data, DataSiz= e); > >>>> - if (EFI_ERROR (Status)) { > >>>> - // > >>>> - // The auto update operation failed, directly return to avoi= d > >> inconsistency > >>>> between PlatformLang and Lang. > >>>> - // > >>>> - goto Done; > >>>> - } > >>>> - } > >>>> - > >>>> if (mVariableModuleGlobal->VariableGlobal.AuthSupport) { > >>>> Status =3D AuthVariableLibProcessVariable (VariableName, > >>>> VendorGuid, Data, DataSize, Attributes); > >>>> } else { > >>>> -- > >>>> 2.8.1 > >>>> > >>>> > >>>>=20 > >>> > >>> > >>> > > > > > > . > >