qemu-e2k/scripts
Vladimir Sementsov-Ogievskiy adff55b520 coverity: physmem: use simple assertions instead of modelling
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>
2023-11-24 12:07:47 +01:00
..
ci net: add initial support for AF_XDP network backend 2023-09-18 14:36:13 +08:00
coccinelle
codeconverter scripts/: spelling fixes 2023-09-08 13:08:52 +03:00
coverage
coverity-scan coverity: physmem: use simple assertions instead of modelling 2023-11-24 12:07:47 +01:00
kvm target/i386: enumerate bit 56 of MSR_IA32_VMX_BASIC 2023-09-21 10:39:51 +02:00
modules
oss-fuzz system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
performance scripts/: spelling fixes 2023-09-08 13:08:52 +03:00
qapi qapi: Fix QAPISchemaEntity.__repr__() 2023-11-13 10:36:51 +01:00
qemu-guest-agent
qemugdb
qmp
simplebench scripts/: spelling fixes 2023-09-08 13:08:52 +03:00
tracetool tracetool: avoid invalid escape in Python string 2023-11-09 15:03:02 +08:00
analyse-9p-simpletrace.py
analyse-locks-simpletrace.py scripts/analyse-locks-simpletrace.py: changed iteritems() to items() 2023-09-26 12:28:51 -04:00
analyze-inclusions
analyze-migration.py migration: Fix analyze-migration read operation signedness 2023-10-17 09:14:32 +02:00
archive-source.sh make-release: do not ship dtc sources 2023-09-29 09:33:10 +02:00
block-coroutine-wrapper.py block: Fix deadlocks in bdrv_graph_wrunlock() 2023-11-21 12:45:21 +01:00
check_sparse.py
checkpatch.pl system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
clean-header-guards.pl
clean-includes
cleanup-trace-events.pl
cocci-macro-file.h
cpu-x86-uarch-abi.py scripts/cpu-x86-uarch-abi.py: Fix parameter error of cmd 2023-11-07 16:45:18 +00:00
decodetree.py tests/decode: Suppress "error: " string for expected-failure tests 2023-07-25 10:56:52 +01:00
device-crash-test python/qemu: rename command() to cmd() 2023-10-12 14:21:43 -04:00
disas-objdump.pl
dump-guest-memory.py
entitlement.sh
extract-vsssdk-headers
feature_to_c.py gdbstub: Add num_regs member to GDBFeature 2023-11-08 15:15:23 +00:00
fix-multiline-comments.sh
gensyscalls.sh
get_maintainer.pl scripts/get_maintainer.pl: don't print parentheses 2023-10-17 15:20:53 +02:00
git-submodule.sh scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour 2023-07-25 10:56:51 +01:00
git.orderfile
hxtool
kernel-doc
make-config-poison.sh exec/poison: Do not poison CONFIG_SOFTMMU 2023-06-05 12:04:29 -07:00
make-release make-release: do not ship dtc sources 2023-09-29 09:33:10 +02:00
meson-buildoptions.py meson-buildoptions: document the data at the top 2023-10-18 10:01:02 +02:00
meson-buildoptions.sh build-sys: add a "pixman" feature 2023-11-07 14:04:24 +04:00
meson.build scripts: add a XML preprocessor script 2023-06-27 17:08:56 +02:00
minikconf.py
modinfo-collect.py
modinfo-generate.py
mtest2make.py
nsis.py
probe-gdb-support.py
python_qmp_updater.py scripts: add python_qmp_updater.py 2023-10-12 14:21:44 -04:00
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 scripts: Add qom-cast-macro-clean-cocci-gen.py 2023-06-05 20:48:34 +02:00
refresh-pxe-roms.sh
render_block_graph.py python/qemu: rename command() to cmd() 2023-10-12 14:21:43 -04:00
replay-dump.py scripts/: spelling fixes 2023-09-08 13:08:52 +03:00
shaderinclude.py
signrom.py
simpletrace.py simpletrace: added simplified Analyzer2 class 2023-09-26 12:28:51 -04:00
symlink-install-tree.py
tracetool.py
u2f-setup-gen.py
undefsym.py
update-linux-headers.sh scripts/update-linux-headers: Add iommufd.h 2023-10-18 10:10:49 +02:00
update-mips-syscall-args.sh
update-syscalltbl.sh
userfaultfd-wrlat.py
vmstate-static-checker.py
xen-detect.c xen: Drop support for Xen versions below 4.7.1 2023-06-07 15:07:10 +01:00
xml-preprocess-test.py scripts: add a XML preprocessor script 2023-06-27 17:08:56 +02:00
xml-preprocess.py scripts/xml-preprocess: Make sure this script is invoked via the right Python 2023-10-12 00:37:39 +03:00