From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 0BECD7803CE for ; Tue, 9 Jan 2024 16:36:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=GaaIVApCl0HUJIni4pQwd8SGeBz5uKI6EFVtgnSYpkQ=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1704818186; v=1; b=rcsJANCP7cGtHuoewGYc7oqUIbEwll+Igitu8yKq2HII/2xSZgWdlCcfYsWd0zkLtiFuUCbj 6Z95R2eyJtsQuA5EcXc/25rPCDTmGn0NHFSz1tIW7waRr9ah3b5eL56Hx7hfLwM4hM00s9GSqCQ QJCBGpHTVvQ50XeYIHYeNC5o= X-Received: by 127.0.0.2 with SMTP id eLkMYY7687511xrMfNPtBpvV; Tue, 09 Jan 2024 08:36:26 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.21438.1704818186086248677 for ; Tue, 09 Jan 2024 08:36:26 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-52-CugpfRHdM4WryyIgMXf73g-1; Tue, 09 Jan 2024 11:36:23 -0500 X-MC-Unique: CugpfRHdM4WryyIgMXf73g-1 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 703F6185A781; Tue, 9 Jan 2024 16:36:23 +0000 (UTC) X-Received: from [10.39.193.97] (unknown [10.39.193.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63F851121306; Tue, 9 Jan 2024 16:36:22 +0000 (UTC) Message-ID: <1a7d349c-c5d3-7ad5-bed4-3673def8a292@redhat.com> Date: Tue, 9 Jan 2024 17:36:21 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v5 3/3] OvmfPkg/VirtNorFlashDxe: sanity-check variables To: devel@edk2.groups.io, kraxel@redhat.com Cc: Sunil V L , Jiewen Yao , oliver@redhat.com, Andrei Warkentin , Ard Biesheuvel References: <20240109112902.30002-1-kraxel@redhat.com> <20240109112902.30002-4-kraxel@redhat.com> <7sym3x3fxx2nxp5wt7we6gqgxl4ngijggsmohmarb3fnozhxtj@cqkijlwl6etg> From: "Laszlo Ersek" In-Reply-To: <7sym3x3fxx2nxp5wt7we6gqgxl4ngijggsmohmarb3fnozhxtj@cqkijlwl6etg> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk 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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: CUT9YYRWOQ1erp3mtdSPKMQYx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=rcsJANCP; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 1/9/24 15:11, Gerd Hoffmann wrote: > Hi, >=20 >> Nit: to my knowledge, the coding style forbids initialization of "auto" >> storage class variables (more commonly put, "non-static local >> variables"). IOW, we should spell the above as: >> >> | diff --git a/OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c b/OvmfPkg/VirtN= orFlashDxe/VirtNorFlashFvb.c >> | index ca2e40743dfd..8fcd999ac6df 100644 >> | --- a/OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c >> | +++ b/OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c >> | @@ -283,7 +283,9 @@ ValidateFvHeader ( >> | >> | if (VarHeaderEnd >=3D VariableStoreHeader->Size) { >> | if (VarOffset <=3D VariableStoreHeader->Size - sizeof (UINT16))= { >> | - CONST UINT16 *StartId =3D (VOID *)((UINTN)VariableStoreHeade= r + VarOffset); >> | + CONST UINT16 *StartId; >> | + >> | + StartId =3D (VOID *)((UINTN)VariableStoreHeader + VarOffset); >> | if (*StartId =3D=3D 0x55aa) { >> | DEBUG ((DEBUG_ERROR, "%a: startid at invalid location\n", _= _func__)); >> | return EFI_NOT_FOUND; >> >> Do you want me to fix up the patch upon merge for you, >=20 > I happily accept that service offer ;) Series merged as commit range 08a6528bac38..4a443f73fd67, via . (Last three commits in the PR.) Laszlo -=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 (#113484): https://edk2.groups.io/g/devel/message/113484 Mute This Topic: https://groups.io/mt/103617812/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-