qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefano Garzarella <sgarzare@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Ani Sinha <anisinha@redhat.com>,
	Luigi Leonardi <leonardi@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>, Zhao Liu <zhao1.liu@intel.com>,
	Roy Hopkins <roy.hopkins@randomman.co.uk>
Subject: [PATCH v4 2/5] igvm: fix off by one bug in memmap entry count checking
Date: Wed, 22 Oct 2025 10:44:36 +0200	[thread overview]
Message-ID: <20251022084439.242476-3-kraxel@redhat.com> (raw)
In-Reply-To: <20251022084439.242476-1-kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 backends/igvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/backends/igvm.c b/backends/igvm.c
index 723d45b755a0..055bbba745ad 100644
--- a/backends/igvm.c
+++ b/backends/igvm.c
@@ -567,7 +567,7 @@ static int qigvm_directive_memory_map(QIgvm *ctx, const uint8_t *header_data,
 
             retval = ctx->cgsc->get_mem_map_entry(entry, &cgmm_entry, errp);
             while (retval == 0) {
-                if (entry > max_entry_count) {
+                if (entry >= max_entry_count) {
                     error_setg(
                         errp,
                         "IGVM: guest memory map size exceeds parameter area defined in IGVM file");
-- 
2.51.0



  parent reply	other threads:[~2025-10-22  8:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22  8:44 [PATCH v4 0/5] igvm: add support for igvm memory map parameter in native mode Gerd Hoffmann
2025-10-22  8:44 ` [PATCH v4 1/5] igvm: move igvm.h file to include/system Gerd Hoffmann
2025-10-22 12:09   ` Luigi Leonardi
2025-10-22  8:44 ` Gerd Hoffmann [this message]
2025-10-22 12:10   ` [PATCH v4 2/5] igvm: fix off by one bug in memmap entry count checking Luigi Leonardi
2025-10-22 12:32   ` Stefano Garzarella
2025-10-22  8:44 ` [PATCH v4 3/5] igvm: add support for igvm memory map parameter in native mode Gerd Hoffmann
2025-10-22 12:11   ` Luigi Leonardi
2025-10-22  8:44 ` [PATCH v4 4/5] igvm: add support for initial register state load " Gerd Hoffmann
2025-10-22 13:22   ` Luigi Leonardi
2025-10-22 14:37     ` Gerd Hoffmann
2025-10-22 15:26       ` Luigi Leonardi
2025-10-22  8:44 ` [PATCH v4 5/5] igvm: add MAINTAINERS entry Gerd Hoffmann

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=20251022084439.242476-3-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=leonardi@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=roy.hopkins@randomman.co.uk \
    --cc=sgarzare@redhat.com \
    --cc=zhao1.liu@intel.com \
    /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).