From nobody Tue May 7 14:41:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+78903+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+78903+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=posteo.de ARC-Seal: i=1; a=rsa-sha256; t=1628451646; cv=none; d=zohomail.com; s=zohoarc; b=mP5gekz2rL0jMIlY443ft+f5c9IHnPCbjOb9/wIKWCKNt3ndoLqyBwhn2zH5FscWmXdU1ZxS25quC6CXHt7ThyGJR5sIaODyGLVJVjyWIg3BcMQf86CJtfKVYQ5nPJsu7+SNW0KhcOVPcZxetykD/7CVR1MLJImsdVY3fw/xm0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628451646; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ZWDdtG1Uf2V9UOItSOQVTO9ykbrgneYmCpfqu+0uEpk=; b=XeWDIMygW8mlAUFUYkwW2FtBx7mZk3fCAws5Hxc73rT5UvOGM+NcFPrFJO+6Owr31wEVTeQpm2PLSIj8cZFTjffcbnDMg/AAsg0c1p8d/ZugeHjk3n5zuP8CHKoIceX9t6q6rT4PZoXUa0pFCRWFvnrfZsHnj93Mp6O1h++HHjs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+78903+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1628451646849623.6444090982664; Sun, 8 Aug 2021 12:40:46 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id zrxyYY1788612xZrRVnldfTJ; Sun, 08 Aug 2021 12:40:46 -0700 X-Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) by mx.groups.io with SMTP id smtpd.web10.13768.1628451645303798713 for ; Sun, 08 Aug 2021 12:40:45 -0700 X-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id BAAF8240027 for ; Sun, 8 Aug 2021 21:40:43 +0200 (CEST) X-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GjV1l2P7lz6tm6; Sun, 8 Aug 2021 21:40:43 +0200 (CEST) From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Vitaly Cheptsov Subject: [edk2-devel] [PATCH] ArmPkg/DefaultExceptionHandlerLib: Mandatory LoadedImage for DebugImageInfoTable Date: Sun, 8 Aug 2021 19:40:02 +0000 Message-Id: <87b3d2de23505feb627506a008f9713fda7fd65a.1628443860.git.mhaeuser@posteo.de> In-Reply-To: <88816e99692b15cf61f3057ffab4d54455159c7c.1628443860.git.mhaeuser@posteo.de> References: <88816e99692b15cf61f3057ffab4d54455159c7c.1628443860.git.mhaeuser@posteo.de> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,mhaeuser@posteo.de X-Gm-Message-State: iZTEvRyalmO0lKdN978AVsTFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1628451646; bh=ebPgGIiprgLC3kEXscRiYnk1Utbf/M3sgVOqiMVUcxw=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=NdTP2lTuzSr0IQxoM9n57hdY6nj2Q1MjQl7X/duOW1X9DpA1MQsJE/oP8PDQCAhi60N wW+3H3AlRTu4+NS89aD7/QSZ2tcPDfJJFEhL72aPunFiVc4Y/AOi0OoJYZ9UUkVEZ+6TJ JWYBwQmKFBGMUAh3iQNwYFvV1QYm8KR45Qw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1628451648068100107 Content-Type: text/plain; charset="utf-8" To make parsing DebugImageInfoTable easier and safer, require the LoadedImage protocol instance to be valid for every NormalImage entry. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Vitaly Cheptsov Signed-off-by: Marvin H=C3=A4user --- ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi.c | = 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHand= lerUefi.c b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandl= erUefi.c index 9befb6d4db9b..d442b5d358b2 100644 --- a/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi= .c +++ b/ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerUefi= .c @@ -52,8 +52,9 @@ GetImageName ( Address =3D (CHAR8 *)(UINTN)FaultAddress; for (Entry =3D 0; Entry < DebugTableHeader->TableSize; Entry++, DebugTab= le++) { if (DebugTable->ImageInfoType !=3D NULL) { - if ((*DebugTable->ImageInfoType =3D=3D EFI_DEBUG_IMAGE_INFO_TYPE_NOR= MAL) && - (DebugTable->NormalImage->LoadedImageProtocolInstance !=3D NULL)= ) { + if (*DebugTable->ImageInfoType =3D=3D EFI_DEBUG_IMAGE_INFO_TYPE_NORM= AL) { + ASSERT (gDebugTable->NormalImage->LoadedImageProtocolInstance !=3D= NULL); + if ((Address >=3D (CHAR8 *)DebugTable->NormalImage->LoadedImagePro= tocolInstance->ImageBase) && (Address <=3D ((CHAR8 *)DebugTable->NormalImage->LoadedImagePr= otocolInstance->ImageBase + DebugTable->NormalImage->LoadedImageProtocolIns= tance->ImageSize))) { *ImageBase =3D (UINTN)DebugTable->NormalImage->LoadedImageProtoc= olInstance->ImageBase; --=20 2.31.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 (#78903): https://edk2.groups.io/g/devel/message/78903 Mute This Topic: https://groups.io/mt/84754078/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-