From nobody Fri Apr 26 18:09:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43417+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43417+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1562644032; cv=none; d=zoho.com; s=zohoarc; b=odcn0ruBuU8yrPglfzXbJYIbyLyzQoI25gl5dQzb7lQZbAo363tK1vBMhJi0XS2QQ7AgrFEeJVV/eWXEffA2Hudl+Uaj0X36dCQ20QHNLU/URVQab6sD21EWXp7G9dKBkCfGVKBIOq+rl4USzuEr9DfyXzh3m1jLwVHOKVrzZ5E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562644032; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=uCMp3isSlylz7/y9kFVleyVaD+cR7d3+DlhbwX/dqUM=; b=jrQ+f0Fzw4TwL5RRjeOyGUJJ9Z12tsZ59AHsv56tUpSR9nx9h+vdZN9wsOYodL/fdjl8VYDXjeObSjR0f0+R5acX1xnDLkXKlN4tKCCye8DlryS/hOmHmd58mCVkjdbniSZCYu60Dtcm+y2Jmf0xB2E1JToJb0AuIZUQbXh/xcU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43417+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1562644032768184.22337075244673; Mon, 8 Jul 2019 20:47:12 -0700 (PDT) Return-Path: X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Mon, 08 Jul 2019 20:47:11 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jul 2019 20:47:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,469,1557212400"; d="scan'208";a="167859305" X-Received: from chinghux-desk1.gar.corp.intel.com ([10.5.215.157]) by orsmga003.jf.intel.com with ESMTP; 08 Jul 2019 20:47:09 -0700 From: "GregX Yeh" To: devel@edk2.groups.io Cc: Dandan Bi , Ray Ni , Ted Kuo Subject: [edk2-devel] [PATCH] MdeModulePkg/Setup: Check ConfigAccess protocol in case it's destroyed Date: Tue, 9 Jul 2019 11:46:54 +0800 Message-Id: <20190709034654.14896-1-gregx.yeh@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,gregx.yeh@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1562644032; bh=uYy0MnO6r4SsWDkYQZxMJ3E9gL82Syx5NZH+jHQN7Ic=; h=Cc:Date:From:Reply-To:Subject:To; b=PrArZfKGhXQ+R234fY2XnBzyrOgzIMx91tj+nTGlWLrRJZm0JsBjleLP7qJ1GBGOpzL MY0XbE5mVtvRufEiNLM6J1KKs9GWJAfDj3YeyGYTWLknwxm90JrQqqwl7x3ek2b2fJlkd 0FclJshsz6b9wSosjmPnlzG12Q6j2l4wjIw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Dandan Bi --- .../Universal/SetupBrowserDxe/Presentation.c | 34 ++++++++++++++++++= ++++ 1 file changed, 34 insertions(+) diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeMod= ulePkg/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; =20 +/** + Check whether the ConfigAccess protocol is available + + @parm FormSet FormSet of which the ConfigAcces protocol need t= o 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. =20 @@ -1686,6 +1718,8 @@ DisplayForm ( return Status; } =20 + CheckConfigAccess(gCurrentSelection->FormSet); + Status =3D ProcessUserInput (&UserInput); FreeDisplayFormData(); return Status; --=20 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43417): https://edk2.groups.io/g/devel/message/43417 Mute This Topic: https://groups.io/mt/32402217/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-