From nobody Mon Feb 9 12:26:26 2026 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+47411+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+47411+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1568749830; cv=none; d=zoho.com; s=zohoarc; b=HsBe3R4juAPKf8fhBiQIUL8XkpeKjzPNUfXgfiEBI7e2SWRg+mbtPNKlcbaPynFljDoNrDWDjQiC3IzNQjOZZBryhEqFspKPAWFqbQmJCa7roIoiLDB3rG1fOkX3SpswkuJnoK0pKRNZ2rq6HVPaR3+6Sxohm6jai84WHTOAGH8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568749830; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=+afYzAbiSg8YQcpzt8OxQ4D2xSG8ScNj2khMZItAYiY=; b=MfE7KIZKWQ5Oxj8zzbMdRnycJrH20qQ5/5u4ZLd48xzm4LsppylZ2RxlfiHNwiLG4jcMPxIA5UBCEoj4ypAx8D4vhE1cD/y+3bPckjeY9eI429JOrZearm6LByGgSiHKRcJTvdhUPzhTAxUhXYnz/GprjoLORCTlnbJNW38XPAY= 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+47411+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 1568749830334321.9105759906796; Tue, 17 Sep 2019 12:50:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id tpJjYY1788612xFD2ZJqvl5P; Tue, 17 Sep 2019 12:50:29 -0700 X-Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 17 Sep 2019 12:50:29 -0700 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2AAD083F40; Tue, 17 Sep 2019 19:50:29 +0000 (UTC) X-Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 20E25600C4; Tue, 17 Sep 2019 19:50:27 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Ard Biesheuvel , Jordan Justen Subject: [edk2-devel] [PATCH 24/35] OvmfPkg/PlatformDxe: fix EFI_HII_HANDLE parameters of internal functions Date: Tue, 17 Sep 2019 21:49:24 +0200 Message-Id: <20190917194935.24322-25-lersek@redhat.com> In-Reply-To: <20190917194935.24322-1-lersek@redhat.com> References: <20190917194935.24322-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 17 Sep 2019 19:50:29 +0000 (UTC) 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,lersek@redhat.com X-Gm-Message-State: iDJ9QVE5M9QPfHb3OKkv3sbqx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1568749829; bh=3M173DsmfHk4frAhkueD0/jLMIw61QgDQ8RlgKEEgQw=; h=Cc:Date:From:Reply-To:Subject:To; b=TG7zQshei6F3tLS0F1/FH2FWazFsAd2U2gUA9+2+sVxIAE6ll8VR3NbuK5BIzEG/50y 3cOzlgG+UP4Bq7y0ibe4sJPXLculvJoHvtcBDg4r3L/WxXRoHC2hzisOhUcQr6t4UmeSL oF7CGUHQKeKVmB6LVG0rWkekPKj7CO7rCrw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" In the following call tree: PlatformInit () mInstalledPackages =3D HiiAddPackages () GopInstalled () PopulateForm (PackageList =3D mInstalledPackages) CreateResolutionOptions (PackageList) HiiSetString (PackageList HiiUpdateForm (PackageList) PlatformDxe passes around an EFI_HII_HANDLE that (a) originates from HiiAddPackages() and (b) is ultimately passed to HiiSetString() and HiiUpdateForm(). The intermediate functions PopulateForm() and CreateResolutionOptions() however take that parameter as an (EFI_HII_HANDLE*). There is no bug in practice (because the affected functions never try to de-reference the "PackageList" parameter, they just pass it on), but the function prototypes are semantically wrong. Fix that. This could remain hidden so long because pointer-to-VOID silently converts to/from any pointer-to-object type, and the UEFI spec mandates that EFI_HII_HANDLE be a typedef to (VOID*). Cc: Ard Biesheuvel Cc: Jordan Justen Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel Reviewed-by: Philippe Mathieu-Daude --- Notes: tested in UiApp OvmfPkg/PlatformDxe/Platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c index 09181769babf..23ad43901f66 100644 --- a/OvmfPkg/PlatformDxe/Platform.c +++ b/OvmfPkg/PlatformDxe/Platform.c @@ -486,7 +486,7 @@ STATIC EFI_STATUS EFIAPI CreateResolutionOptions ( - IN EFI_HII_HANDLE *PackageList, + IN EFI_HII_HANDLE PackageList, OUT VOID **OpCodeBuffer, IN UINTN NumGopModes, IN GOP_MODE *GopModes @@ -547,7 +547,7 @@ STATIC EFI_STATUS EFIAPI PopulateForm ( - IN EFI_HII_HANDLE *PackageList, + IN EFI_HII_HANDLE PackageList, IN EFI_GUID *FormSetGuid, IN EFI_FORM_ID FormId, IN UINTN NumGopModes, --=20 2.19.1.3.g30247aa5d201 -=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 (#47411): https://edk2.groups.io/g/devel/message/47411 Mute This Topic: https://groups.io/mt/34180225/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-