From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: jian.j.wang@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Tue, 09 Jul 2019 19:06:31 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2019 19:06:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,472,1557212400"; d="scan'208";a="156357171" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga007.jf.intel.com with ESMTP; 09 Jul 2019 19:06:30 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jul 2019 19:06:30 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jul 2019 19:06:29 -0700 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.162]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.240]) with mapi id 14.03.0439.000; Wed, 10 Jul 2019 10:06:27 +0800 From: "Wang, Jian J" To: "devel@edk2.groups.io" , "Bi, Dandan" , "Yeh, GregX" CC: "Ni, Ray" , "Kuo, Ted" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/Setup: Check ConfigAccess protocol in case it's destroyed Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/Setup: Check ConfigAccess protocol in case it's destroyed Thread-Index: AQHVNgkKL/54Lw+0P0+DQM2iYyaidqbCfkYAgACdvWA= Date: Wed, 10 Jul 2019 02:06:27 +0000 Message-ID: References: <20190709034654.14896-1-gregx.yeh@intel.com> <3C0D5C461C9E904E8F62152F6274C0BB40C1DBA4@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <3C0D5C461C9E904E8F62152F6274C0BB40C1DBA4@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYTIzMzAxMGItNTJmOC00MjRmLWI4ZjMtZmJkZGQxNjcxYjVkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiV1phaFc0czFsSmtzbkp0ejBXemVrS01FeFptWUF4STJQalZLdnpcL2tPRlF5ODBHZkx0U1hCa0NWcGFOMDhpQWoifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: jian.j.wang@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Patch was pushed at 034a3b4f555c6844673a5ee6b7aa4faa74e90a6e Regards, Jian > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Dandan Bi > Sent: Wednesday, July 10, 2019 8:42 AM > To: devel@edk2.groups.io; Yeh, GregX > Cc: Ni, Ray ; Kuo, Ted > Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/Setup: Check > ConfigAccess protocol in case it's destroyed >=20 > Reviewed-by: Dandan Bi >=20 > Thanks, > Dandan >=20 > > -----Original Message----- > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > > GregX Yeh > > Sent: Tuesday, July 9, 2019 11:47 AM > > To: devel@edk2.groups.io > > Cc: Bi, Dandan ; Ni, Ray ; Kuo, > Ted > > > > Subject: [edk2-devel] [PATCH] MdeModulePkg/Setup: Check ConfigAccess > > protocol in case it's destroyed > > > > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1920 > > Check ConfigAccess protocol is available before process user input. > > > > Signed-off-by: GregX Yeh > > Cc: Dandan Bi > > Cc: Ray Ni > > Cc: Ted Kuo > > --- > > .../Universal/SetupBrowserDxe/Presentation.c | 34 > > ++++++++++++++++++++++ > > 1 file changed, 34 insertions(+) > > > > diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c > > b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c > > index d7927725b2..7c36a6f2b7 100644 > > --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c > > +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c > > @@ -20,6 +20,38 @@ UINT16 mCurFakeQestId; > > FORM_DISPLAY_ENGINE_FORM gDisplayFormData; > > BOOLEAN mFinishRetrieveCall =3D FALSE; > > > > +/** > > + Check whether the ConfigAccess protocol is available > > + > > + @parm FormSet FormSet of which the ConfigAcces protocol n= eed > to > > be checked. > > + > > + @retval EFI_SUCCESS The function executed successfully. > > + > > +**/ > > +EFI_STATUS > > +CheckConfigAccess( > > + IN FORM_BROWSER_FORMSET *FormSet > > + ) > > +{ > > + EFI_STATUS Status; > > + > > + Status =3D gBS->HandleProtocol ( > > + FormSet->DriverHandle, > > + &gEfiHiiConfigAccessProtocolGuid, > > + (VOID **) &FormSet->ConfigAccess > > + ); > > + if (EFI_ERROR (Status)) { > > + // > > + // Configuration Driver don't attach ConfigAccess protocol to its= HII > > package > > + // list, then there will be no configuration action required. > > + // Or the ConfigAccess protocol has been uninstalled. > > + // > > + FormSet->ConfigAccess =3D NULL; > > + } > > + > > + return EFI_SUCCESS; > > +} > > + > > /** > > Evaluate all expressions in a Form. > > > > @@ -1686,6 +1718,8 @@ DisplayForm ( > > return Status; > > } > > > > + CheckConfigAccess(gCurrentSelection->FormSet); > > + > > Status =3D ProcessUserInput (&UserInput); > > FreeDisplayFormData(); > > return Status; > > -- > > 2.16.2.windows.1 > > > > > > >=20 >=20 >=20