Re: [edk2-devel] [PATCH 00/10] patches for some warnings raised by "RH covscan"
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 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#38996): https://edk2.groups.io/g/devel/message/38996 Mute This Topic: https://groups.io/mt/31070300/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 00/10] patches for some warnings raised by "RH covscan"
On 04/13/19 01:36, Ard Biesheuvel wrote: > 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, Sorry about that, it wasn't trivial to figure out whom to CC on what, and I opted for sticking with Maintainers.txt (AFAIR). > but this looks good afaict. > > Where needed, > > Acked-by: Ard Biesheuvel Thanks! Laszlo > > >> 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 >> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39099): https://edk2.groups.io/g/devel/message/39099 Mute This Topic: https://groups.io/mt/31070300/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 00/10] patches for some warnings raised by "RH covscan"
Based on feedback thus far: On 04/13/19 01: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): I'll submit a v2 subseries with the first 5 patches: > 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 This is because patches 2 through 4 have to be reworked, and patches 1 and 5 make no real sense without 2-4. Regarding the rest (6-10): > 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 I've dropped patch 8 because both Jordan and I dislike it quite a bit, and it only aims to suppress invalid warnings. I can do that in RH covscan too. I've pushed the rest (6-7 and 9-10) with Ard's A-b, and also picked up Phil's R-b wherever he posted it (933f1990f583..c2f643479eb3): 1 52d229238b2d OvmfPkg/QemuVideoDxe: avoid arithmetic on null pointer 2 dc5bbf10741c OvmfPkg/AcpiPlatformDxe: suppress invalid "deref of undef pointer" warning 3 e30991740d18 OvmfPkg/AcpiPlatformDxe: catch theoretical nullptr deref in Xen code 4 c2f643479eb3 OvmfPkg/BasePciCapLib: suppress invalid "nullptr deref" warning Thanks, Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39301): https://edk2.groups.io/g/devel/message/39301 Mute This Topic: https://groups.io/mt/31070300/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-