From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=kFQscAHP; spf=pass (domain: linaro.org, ip: 209.85.166.66, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by groups.io with SMTP; Fri, 12 Apr 2019 16:37:05 -0700 Received: by mail-io1-f66.google.com with SMTP id x7so10019022ioh.4 for ; Fri, 12 Apr 2019 16:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OYw/Dpn9IxreplsrDYDvXoFMHkVs3TBKRYEfUdGCPG8=; b=kFQscAHPUmULAltBLJxdQKFQYgTXvKfivTgT49XguaI2ILr3iiThiFmDOTZqiH3sx+ G/agcTYG35MZw/tylvq5jI19BCQ5DEQm9FDbNDDSKgSaqjJFj6ec1BxzR4493zlKWsxh korCHMOwKrYNv4jrj7OFcQ0lymcwV35hWkuYz6bt01T6JY0JojxSV4XU0zJvvAf3l5EA wvBUbqjOMJNivlEVzdpxDJg1o/+aG8XZ7/TdW6n7YFJZin9aPzpuBbji1+96oYz9ZCwm DEofZQHqTERNDgYcOfuw2IInuNOJd42eWKO3W9fWBfJWfnSdJIlvXyuucEj2FoXEozPu Uh8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OYw/Dpn9IxreplsrDYDvXoFMHkVs3TBKRYEfUdGCPG8=; b=frYcvLp3sEaXUSPgWO3OknErp3sDYisGtFZZtREAJcGgeDDret21LqdEAVknWfYEYd rRiQhDEfRtrtIjWQIB9tDJ6gpDY9C0xe3Ycsg6TbWGsHw43tYt2SNBNjNZeaDxqakKuE kBl1BBdye4h3Ag6AeiQZEnyNSyvDE8rlmzbaMxkA4Coc9yNZI/os2tcgVTXK6EmE2MPW pf9WRyqU8IYuwIms+tVRbpCEiTTGzHORloEoobNL9ZgRzH4bko1rz+x37jtKhh+8OXk4 zTC7BAtXePYHpoKSwi/P7oNPiqaz9/H4/ywrZrQSz9ocJpiNRdlcy3bVT46MGMduoJKP 13gw== X-Gm-Message-State: APjAAAXwump3/rJU3oVyq2VdF0UzFLwsta2gcia4rF//yDSqouKCPP2x C/+E+nniqNpWP3z9rSX3DwdTUCq+YXtY88z4BambfQ== X-Google-Smtp-Source: APXvYqyU2itpwRrzj/JItpNaE0fLDik66OysGH9K9d1y1xzq2AfHUxs4ydEtStINzVO3bnPA0rJpJiSLAVS/LMKqxw0= X-Received: by 2002:a6b:f201:: with SMTP id q1mr32641139ioh.197.1555112224672; Fri, 12 Apr 2019 16:37:04 -0700 (PDT) MIME-Version: 1.0 References: <20190412233128.4756-1-lersek@redhat.com> In-Reply-To: <20190412233128.4756-1-lersek@redhat.com> From: "Ard Biesheuvel" Date: Fri, 12 Apr 2019 16:36:53 -0700 Message-ID: Subject: Re: [PATCH 00/10] patches for some warnings raised by "RH covscan" To: Laszlo Ersek Cc: edk2-devel-groups-io , Anthony Perard , Ard Biesheuvel , Bob Feng , Jordan Justen , Julien Grall , Liming Gao , Michael D Kinney , Yonghong Zhu Content-Type: text/plain; charset="UTF-8" On Fri, 12 Apr 2019 at 16:31, Laszlo Ersek wrote: > > Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710 > Repo: https://github.com/lersek/edk2.git > Branch: covscan_bz_1710 > > "covscan" is an internal service at Red Hat that lets associates run > static analysis tools on Fedora/RHEL packages. It drives a number of > static analyzers. > > While covscan's existence is not "secret" (if you google it, you get a > bunch of hits in the Red Hat Bugzilla), I can *not* use or offer covscan > as a general upstream tool; for that the TianoCore community will have > to build its own service / environment. > > Anyway, "covscan" happened to drop a bunch of reports on me for... > "reasons", and so I turned a short 10 hour workday into yet anoher > normal 15 hour workday (stealing some free time whence there was none) > in order to do something, up-stream, about the warnings that affected > OvmfPkg. No claim is made about the completeness of the scan's coverage. > > Some of the patches seek to suppress warnings, some strive to remedy > valid-looking issues. We should not spend much time on this series. > > Cc: Anthony Perard > Cc: Ard Biesheuvel > Cc: Bob Feng > Cc: Jordan Justen > Cc: Julien Grall > Cc: Liming Gao > Cc: Michael D Kinney > Cc: Yonghong Zhu > > Thanks > Laszlo > > Laszlo Ersek (10): > MdePkg/PiFirmwareFile: express IS_SECTION2 in terms of SECTION_SIZE > MdePkg/PiFirmwareFile: fix undefined behavior in SECTION_SIZE > BaseTools/PiFirmwareFile: fix undefined behavior in SECTION_SIZE > MdePkg/PiFirmwareFile: fix undefined behavior in FFS_FILE_SIZE > OvmfPkg/Sec: fix out-of-bounds reads > OvmfPkg/QemuVideoDxe: avoid arithmetic on null pointer > OvmfPkg/AcpiPlatformDxe: suppress invalid "deref of undef pointer" > warning > OvmfPkg: suppress "Value stored to ... is never read" analyzer > warnings > OvmfPkg/AcpiPlatformDxe: catch theoretical nullptr deref in Xen code > OvmfPkg/BasePciCapLib: suppress invalid "nullptr deref" warning > Thanks for the cleanup. I wasn't cc'ed on all patches, but this looks good afaict. Where needed, Acked-by: Ard Biesheuvel > BaseTools/Source/C/Include/Common/PiFirmwareFile.h | 7 +++++- > MdePkg/Include/Pi/PiFirmwareFile.h | 26 ++++++++++++++++---- > OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c | 7 ++++++ > OvmfPkg/AcpiPlatformDxe/Xen.c | 14 ++++++++++- > OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c | 7 ++++++ > OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c | 5 ++++ > OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c | 4 +++ > OvmfPkg/Library/VirtioLib/VirtioLib.c | 5 ++++ > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c | 5 ++++ > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceDxe.c | 5 ++++ > OvmfPkg/QemuVideoDxe/VbeShim.c | 2 +- > OvmfPkg/SataControllerDxe/SataController.c | 5 ++++ > OvmfPkg/Sec/SecMain.c | 6 ++--- > OvmfPkg/VirtioGpuDxe/Gop.c | 6 +++++ > OvmfPkg/VirtioNetDxe/SnpReceive.c | 5 ++++ > 15 files changed, 98 insertions(+), 11 deletions(-) > > -- > 2.19.1.3.g30247aa5d201 >