From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F0E301A1EF9 for ; Thu, 15 Sep 2016 06:38:05 -0700 (PDT) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 788D781255; Thu, 15 Sep 2016 13:38:05 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-94.phx2.redhat.com [10.3.116.94]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8FDc3mC030863; Thu, 15 Sep 2016 09:38:04 -0400 To: Ard Biesheuvel , edk2-devel@ml01.01.org References: <1473946233-10547-1-git-send-email-ard.biesheuvel@linaro.org> <1473946233-10547-2-git-send-email-ard.biesheuvel@linaro.org> From: Laszlo Ersek Message-ID: <9b4a70f2-f2a4-1b3b-5239-2133d5a693f4@redhat.com> Date: Thu, 15 Sep 2016 15:38:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1473946233-10547-2-git-send-email-ard.biesheuvel@linaro.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 15 Sep 2016 13:38:05 +0000 (UTC) Subject: Re: [PATCH 1/4] ArmVirtPkg/FdtClientDxe: fix check for size of "reg" properties X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Sep 2016 13:38:06 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 09/15/16 15:30, Ard Biesheuvel wrote: > Currently, the code in FdtClientDxe assumes #address-cells and s/and/are/? Reviewed-by: Laszlo Ersek > of tuples, this means the size of the entire property > should always be a multiple of 16 bytes (i.e, 4 * sizeof(UINT32), > not 8. So fix this. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > ArmVirtPkg/FdtClientDxe/FdtClientDxe.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c > index c336e2410033..2063a597323b 100644 > --- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c > +++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c > @@ -178,7 +178,7 @@ FindCompatibleNodeReg ( > return Status; > } > > - if ((*RegSize % 8) != 0) { > + if ((*RegSize % 16) != 0) { > DEBUG ((EFI_D_ERROR, > "%a: '%a' compatible node has invalid 'reg' property (size == 0x%x)\n", > __FUNCTION__, CompatibleString, *RegSize)); >