[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] adff55: coverity: physmem: use simple asserti
From: |
Alex Bennée |
Subject: |
[Qemu-commits] [qemu/qemu] adff55: coverity: physmem: use simple assertions instead o... |
Date: |
Tue, 28 Nov 2023 05:01:50 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: adff55b520ef9ad2907a91409b152220c1ba8051
https://github.com/qemu/qemu/commit/adff55b520ef9ad2907a91409b152220c1ba8051
Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M scripts/coverity-scan/model.c
M system/physmem.c
Log Message:
-----------
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>
Commit: 913e47cb6b6dba3c9ae705d3d67377a03ee499ac
https://github.com/qemu/qemu/commit/913e47cb6b6dba3c9ae705d3d67377a03ee499ac
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M configure
M tests/Makefile.include
Log Message:
-----------
tests: respect --enable/--disable-download for Avocado
Pass the content of $mkvenv_flags (which is either "--online"
or empty) down to tests/Makefile.include.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: 6dc8a887851c6f8ff1fdfc69a9b4689e29db6ac6
https://github.com/qemu/qemu/commit/6dc8a887851c6f8ff1fdfc69a9b4689e29db6ac6
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M docs/devel/build-system.rst
M pythondeps.toml
Log Message:
-----------
docs: document what configure does with virtual environments
Given the recent confusion around how QEMU detects the system
Meson installation, and/or decides to install its own, it is
time to fill in the "Python virtual environments and the QEMU
build system" section of the documentation.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: 1a1e889f3576f60f29ccb71a70f53907ad95a6a7
https://github.com/qemu/qemu/commit/1a1e889f3576f60f29ccb71a70f53907ad95a6a7
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M python/scripts/vendor.py
R python/wheels/meson-0.63.3-py3-none-any.whl
A python/wheels/meson-1.2.3-py3-none-any.whl
M pythondeps.toml
Log Message:
-----------
buildsys: Bump known good meson version to v1.2.3
We need meson v1.2.3 to build QEMU on macOS Sonoma. It
also builds fine all our CI jobs (as tested by also bumping
"accepted" in pythondeps.toml), so let's use it as our
"good enough" packaged wheel.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1939
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231109160504.93677-2-philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: 541069e653b56043afb9e28ee5ce1f146163472e
https://github.com/qemu/qemu/commit/541069e653b56043afb9e28ee5ce1f146163472e
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M .gitlab-ci.d/cirrus.yml
A .gitlab-ci.d/cirrus/macos-14.vars
M tests/lcitool/libvirt-ci
M tests/lcitool/refresh
Log Message:
-----------
.gitlab-ci.d/cirrus: Add manual testing of macOS 14 (Sonoma)
Upgrade libvirt-ci so it covers macOS 14. Add a manual entry
(QEMU_JOB_OPTIONAL: 1) to test on Sonoma release. Refresh the
lci-tool generated files.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231109160504.93677-3-philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: e4b9d1999c335ef315376e50da60cb228546aaf4
https://github.com/qemu/qemu/commit/e4b9d1999c335ef315376e50da60cb228546aaf4
Author: Akihiko Odaki <akihiko.odaki@daynix.com>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M audio/audio.c
Log Message:
-----------
audio: Free consumed default audio devices
Failed default audio devices were removed from the list but not freed,
and that made LeakSanitizer sad. Free default audio devices as they are
consumed.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20231120112804.9736-1-akihiko.odaki@daynix.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: 2037a739971da7bae49b86b6de5418ff9ea592f3
https://github.com/qemu/qemu/commit/2037a739971da7bae49b86b6de5418ff9ea592f3
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M disas/cris.c
Log Message:
-----------
disas/cris: Pass buffer size to format_dec() to avoid overflow warning
Propagate the buffer size to format_dec() and use snprintf().
This should silence this UBSan -Wformat-overflow warning:
In file included from /usr/include/stdio.h:906,
from include/qemu/osdep.h:114,
from ../disas/cris.c:21:
In function 'sprintf',
inlined from 'format_dec' at ../disas/cris.c:1737:3,
inlined from 'print_with_operands' at ../disas/cris.c:2477:12,
inlined from 'print_insn_cris_generic.constprop' at
../disas/cris.c:2690:8:
/usr/include/bits/stdio2.h:30:10: warning: null destination pointer
[-Wformat-overflow=]
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
Reported-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231120132222.82138-1-philmd@linaro.org>
[Rewritten to fix logic and avoid repeated expression. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: cd9113633fbaf708a2181dfe886b2380874af2bc
https://github.com/qemu/qemu/commit/cd9113633fbaf708a2181dfe886b2380874af2bc
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M system/memory.c
Log Message:
-----------
system: Use &error_abort in memory_region_init_ram_[device_]ptr()
If an unexpected error condition happens, we have to abort
(&fatal_error is meant for expected errors).
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20231120133112.82447-1-philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: 9abbb37535b27321e9f7bde38a6996343b2bc5f2
https://github.com/qemu/qemu/commit/9abbb37535b27321e9f7bde38a6996343b2bc5f2
Author: Akihiko Odaki <akihiko.odaki@daynix.com>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M configure
Log Message:
-----------
configure: Make only once with pseudo-"in source tree" builds
Pseudo-"in source tree" build used to run make in the build directory
as many times as goals. Worse, although .NOTPARALLEL is specified,
it does not work for patterns, and run make in parallel, which can break
things.
Add a new rule "build", and let it call make. The pattern rule only
needs to specify "build" as its prerequisite and have a no-op recipe so
that it does more than canceling built-in implicit rules.
Fixes: dedad02720 ("configure: add support for pseudo-"in source tree" builds")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-ID: <20231119101604.47325-1-akihiko.odaki@daynix.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: 81a541e9f0838753d06d61b026688bea1eba7c0b
https://github.com/qemu/qemu/commit/81a541e9f0838753d06d61b026688bea1eba7c0b
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2023-11-24 (Fri, 24 Nov 2023)
Changed paths:
M scripts/coverity-scan/run-coverity-scan
Log Message:
-----------
scripts: adjust url to Coverity tools
The URL to the Coverity tools download has changed; the old one points
to an obsolete version that is not supported anymore. Adjust to point
to the correct and supported tools.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: 7e5b19793d0519ec761f2bcf6591a4c995de3894
https://github.com/qemu/qemu/commit/7e5b19793d0519ec761f2bcf6591a4c995de3894
Author: Marc-André Lureau <marcandre.lureau@redhat.com>
Date: 2023-11-25 (Sat, 25 Nov 2023)
Changed paths:
M qga/meson.build
Log Message:
-----------
build-sys: fix meson project version usage
Program wixl found: YES (/usr/bin/wixl)
../qga/meson.build:149:16: ERROR: Unknown variable "project".
Fixes: e20d68aa0b9 ("configure, meson: use command line options to configure
qemu-ga")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Commit: 839e9a48df382359fc18579765907f1bc1f833c3
https://github.com/qemu/qemu/commit/839e9a48df382359fc18579765907f1bc1f833c3
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2023-11-27 (Mon, 27 Nov 2023)
Changed paths:
M .gitlab-ci.d/cirrus.yml
A .gitlab-ci.d/cirrus/macos-14.vars
M audio/audio.c
M configure
M disas/cris.c
M docs/devel/build-system.rst
M python/scripts/vendor.py
R python/wheels/meson-0.63.3-py3-none-any.whl
A python/wheels/meson-1.2.3-py3-none-any.whl
M pythondeps.toml
M scripts/coverity-scan/model.c
M scripts/coverity-scan/run-coverity-scan
M system/memory.c
M system/physmem.c
M tests/Makefile.include
M tests/lcitool/libvirt-ci
M tests/lcitool/refresh
Log Message:
-----------
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* document what configure does with virtual environments
* bump known good meson version to v1.2.3
* upgrade macOS to 13 (Ventura) and Add manual testing of macOS 14 (Sonoma)
* use simple assertions instead of Coverity models
* miscellaneous fixes
* adjust URL to Coverity tools
# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmVgv78UHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroPTmgf/VgDEIRP0teMsz1qAPWyH3eanoF8w
# XN9gN0jYUqv1pYVdBws3qxsZFr0GCUrEhF46wbDBj5BgNYjiO6Cg7la1Ryyry7sV
# GmwgAQhaCelY7USS4tGeK2A/EpEx4M/pOKfzJhAyjm9d87bdOBoankeYjCR0XZqD
# O9CypjA9mxx6Gi28RC1OjIIPxERgazpDMmm1gntEI29qoYiKvD7uOjA3EP7zrBhz
# 6Qi1/cx5WgvhePnFAab25jQDgkFaPViZSV28UdfH/29+bUkcJhyki56+vIoLbEtK
# 18+wVQkOFl10Ibo7cmQ4JnT8q7BaqhXbO54xmT3LKzMi1I8RCOpOiFFGjg==
# =+YGq
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 24 Nov 2023 10:22:39 EST
# gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg: issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
scripts: adjust url to Coverity tools
configure: Make only once with pseudo-"in source tree" builds
system: Use &error_abort in memory_region_init_ram_[device_]ptr()
disas/cris: Pass buffer size to format_dec() to avoid overflow warning
audio: Free consumed default audio devices
.gitlab-ci.d/cirrus: Add manual testing of macOS 14 (Sonoma)
buildsys: Bump known good meson version to v1.2.3
docs: document what configure does with virtual environments
tests: respect --enable/--disable-download for Avocado
coverity: physmem: use simple assertions instead of modelling
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Commit: e867b01cd6658a64c16052117dbb18093a2f9772
https://github.com/qemu/qemu/commit/e867b01cd6658a64c16052117dbb18093a2f9772
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2023-11-27 (Mon, 27 Nov 2023)
Changed paths:
M qga/meson.build
Log Message:
-----------
Merge tag 'qga-pull-2023-11-25' of https://github.com/kostyanf14/qemu into
staging
qga-pull-2023-11-25
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEwsLBCepDxjwUI+uE711egWG6hOcFAmViLdsACgkQ711egWG6
# hOfKIQ//fLIycqEGGLqaORaO04lSOUHU5plSHTU6ACQxILZnMas7CDgfEc2ReCor
# iyGCUBmNJ0NiSMRZIKys+0gWh/jgCW613KlOKTvGsn1WOgzXId5TOZSx4P7vfw2o
# t7gizx02KdaTnOe3VeTCxBRUrCl1skNw487lek++5L7lKD6a4rstND8T4I2fnWyB
# 4Y0gWdIyouWMA2xxkQffxD4ycvHxGeEosp//e6KPB3dk7lM4AAh5CrX/WshItXhp
# dL1oykgBDfRCFP42exOs5PrB4fIrYbP58qEzP+9QZpysqsa3OX0AJZw3Wgd1sbHJ
# 40II+dQTZFN27NTEeZGw1dg38q0bTNvj2dHvv+w3CHjB8Er2Wfm0ERmSWurQGYf5
# uYqNeHfDVg2m6gi4Nzav679NtWlYLhDBN1pok+K8U/im9UK2M9Jk5XieKvOiE8qX
# OVBNMC0ty4Utq6KXZUTjbxQcj5/x50OovN+5CP55OAJBwOCk6Er9j5t9RNuKDLY9
# tkllpjZ6d4KI6uwu1zL4znjNGZvNd7eQNagerv5GNpR5mJZqjv/3snpALUqPHjDA
# GKBAXwGUXeMCyFR4Gi5NjX5czgDaK4naGrq8GN6T47q2CwUMvowXRX3nwpw0Q38W
# BwRjaFEg6mCNy6Vlfj6gIvVF/3PqJh3Iq4rL26I9EMqri0LZW0o=
# =RETE
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 25 Nov 2023 12:24:43 EST
# gpg: using RSA key C2C2C109EA43C63C1423EB84EF5D5E8161BA84E7
# gpg: Good signature from "Kostiantyn Kostiuk (Upstream PR sign)
<kkostiuk@redhat.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: C2C2 C109 EA43 C63C 1423 EB84 EF5D 5E81 61BA 84E7
* tag 'qga-pull-2023-11-25' of https://github.com/kostyanf14/qemu:
build-sys: fix meson project version usage
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Compare: https://github.com/qemu/qemu/compare/4705fc0c8511...e867b01cd665