adff55b520
Unfortunately Coverity doesn't follow the logic aroung "len" and "l" variables in stacks finishing with flatview_{read,write}_continue() and generate a lot of OVERRUN false-positives. When small buffer (2 or 4 bytes) is passed to mem read/write path, Coverity assumes the worst case of sz=8 in stn_he_p()/ldn_he_p() (defined in include/qemu/bswap.h), and reports buffer overrun. To silence these false-positives we have model functions, which hide real logic from Coverity. However, it turned out that these new two assertions are enough to quiet Coverity. Assertions are better than hiding the logic, so let's drop the modelling and move to assertions for memory r/w call stacks. After patch, the sequence cov-make-library --output-file /tmp/master.xmldb \ scripts/coverity-scan/model.c cov-build --dir ~/covtmp/master make -j9 cov-analyze --user-model-file /tmp/master.xmldb \ --dir ~/covtmp/master --all --strip-path "$(pwd) cov-format-errors --dir ~/covtmp/master \ --html-output ~/covtmp/master_html_report Generate for me the same big set of CIDs excepept for 6 disappeared (so it becomes even better). Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Acked-by: David Hildenbrand <david@redhat.com> Message-ID: <20231005140326.332830-1-vsementsov@yandex-team.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
ci | ||
coccinelle | ||
codeconverter | ||
coverage | ||
coverity-scan | ||
kvm | ||
modules | ||
oss-fuzz | ||
performance | ||
qapi | ||
qemu-guest-agent | ||
qemugdb | ||
qmp | ||
simplebench | ||
tracetool | ||
analyse-9p-simpletrace.py | ||
analyse-locks-simpletrace.py | ||
analyze-inclusions | ||
analyze-migration.py | ||
archive-source.sh | ||
block-coroutine-wrapper.py | ||
check_sparse.py | ||
checkpatch.pl | ||
clean-header-guards.pl | ||
clean-includes | ||
cleanup-trace-events.pl | ||
cocci-macro-file.h | ||
cpu-x86-uarch-abi.py | ||
decodetree.py | ||
device-crash-test | ||
disas-objdump.pl | ||
dump-guest-memory.py | ||
entitlement.sh | ||
extract-vsssdk-headers | ||
feature_to_c.py | ||
fix-multiline-comments.sh | ||
gensyscalls.sh | ||
get_maintainer.pl | ||
git-submodule.sh | ||
git.orderfile | ||
hxtool | ||
kernel-doc | ||
make-config-poison.sh | ||
make-release | ||
meson-buildoptions.py | ||
meson-buildoptions.sh | ||
meson.build | ||
minikconf.py | ||
modinfo-collect.py | ||
modinfo-generate.py | ||
mtest2make.py | ||
nsis.py | ||
probe-gdb-support.py | ||
python_qmp_updater.py | ||
qapi-gen.py | ||
qemu-binfmt-conf.sh | ||
qemu-gdb.py | ||
qemu-stamp.py | ||
qemu-trace-stap | ||
qemu-version.sh | ||
qom-cast-macro-clean-cocci-gen.py | ||
refresh-pxe-roms.sh | ||
render_block_graph.py | ||
replay-dump.py | ||
shaderinclude.py | ||
signrom.py | ||
simpletrace.py | ||
symlink-install-tree.py | ||
tracetool.py | ||
u2f-setup-gen.py | ||
undefsym.py | ||
update-linux-headers.sh | ||
update-mips-syscall-args.sh | ||
update-syscalltbl.sh | ||
userfaultfd-wrlat.py | ||
vmstate-static-checker.py | ||
xen-detect.c | ||
xml-preprocess-test.py | ||
xml-preprocess.py |