From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Alexandre Iooss" <erdnaxe@crans.org>,
"Mahmoud Mandour" <ma.mandourr@gmail.com>
Subject: Re: [PATCH] contrib/plugins/execlog: Explicitly check for qemu_plugin_read_register() failure
Date: Thu, 10 Jul 2025 08:21:38 -0700 [thread overview]
Message-ID: <f6c75047-d074-4200-a33a-c864e7beadf1@linaro.org> (raw)
In-Reply-To: <20250710144543.1187715-1-peter.maydell@linaro.org>
On 7/10/25 7:45 AM, Peter Maydell wrote:
> In insn_check_regs() we don't explicitly check whether
> qemu_plugin_read_register() failed, which confuses Coverity into
> thinking that sz can be -1 in the memcmp(). In fact the assertion
> that sz == reg->last->len means this can't happen, but it's clearer
> to both humans and Coverity if we explicitly assert that sz > 0, as
> we already do in init_vcpu_register().
>
> Coverity: CID 1611901, 1611902
> Fixes: af6e4e0a22c1 ("contrib/plugins: extend execlog to track register changes")
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> contrib/plugins/execlog.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
next prev parent reply other threads:[~2025-07-10 15:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 14:45 [PATCH] contrib/plugins/execlog: Explicitly check for qemu_plugin_read_register() failure Peter Maydell
2025-07-10 15:21 ` Pierrick Bouvier [this message]
2025-09-01 16:19 ` Peter Maydell
2025-09-01 17:09 ` Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6c75047-d074-4200-a33a-c864e7beadf1@linaro.org \
--to=pierrick.bouvier@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=erdnaxe@crans.org \
--cc=ma.mandourr@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).