All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Aadeshveer Singh <aadeshveer07@gmail.com>
Cc: qemu-devel@nongnu.org, farosas@suse.de, pbonzini@redhat.com,
	philmd@mailo.com, lvivier@redhat.com, ayoub@saferwall.com
Subject: Re: [RFC PATCH v2 3/7] migration: Use file_bmap for RAMBlock during incoming file load
Date: Wed, 8 Jul 2026 10:56:49 -0400	[thread overview]
Message-ID: <ak5lMYNLxdTA7l2l@x1.local> (raw)
In-Reply-To: <CA++cPvJDBipNRk5Kz2xTx=LvVf2tOe-whoLZH9cT8wY1aKxw7w@mail.gmail.com>

On Wed, Jul 08, 2026 at 07:54:47PM +0530, Aadeshveer Singh wrote:
> > > @@ -4174,14 +4195,14 @@ static void parse_ramblock_mapped_ram(QEMUFile *f, RAMBlock *block,
> > >      num_pages = length / header.page_size;
> > >      bitmap_size = BITS_TO_LONGS(num_pages) * sizeof(unsigned long);
> >
> > Here I think it would still be good to check the page_size is the same as
> > what was expected (in this case, guest page size), otherwise we should fail
> > because then the bitmap_size may still be unpredictable and it can cause
> > illegal access (beyond the size of bitmap allocated) in worst case.
> 
> 
> Hi Peter, thanks for the review,
> Currently mapped_ram_read_header() already enforces header->page_size
> == TARGET_PAGE_SIZE and will throw error before reaching this point.
> However if you would like an explicit check, let me know.

Ahh, I missed that.  Then that would be fine.  With that, if you want you
can add an assertion here and a comment.  But feel free to do whatever you
prefer.

Thanks,

-- 
Peter Xu



  reply	other threads:[~2026-07-08 14:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30  8:19 [RFC PATCH v2 0/7] migration: fast snapshot load Aadeshveer Singh
2026-06-30  8:19 ` [RFC PATCH v2 1/7] migration/tests: remove capability conflict test postcopy-ram+mapped-ram Aadeshveer Singh
2026-07-06 19:02   ` Peter Xu
2026-06-30  8:19 ` [RFC PATCH v2 2/7] migration: Propagate error in postcopy setup functions Aadeshveer Singh
2026-07-06 19:13   ` Peter Xu
2026-06-30  8:19 ` [RFC PATCH v2 3/7] migration: Use file_bmap for RAMBlock during incoming file load Aadeshveer Singh
2026-07-06 19:29   ` Peter Xu
2026-07-08 14:24     ` Aadeshveer Singh
2026-07-08 14:56       ` Peter Xu [this message]
2026-06-30  8:19 ` [RFC PATCH v2 4/7] migration: Make qemu_get_buffer_at() thread-safe Aadeshveer Singh
2026-07-06 19:34   ` Peter Xu
2026-06-30  8:19 ` [RFC PATCH v2 5/7] migration: add RAMBlock field and helper for fast snapshot load Aadeshveer Singh
2026-07-06 20:03   ` Peter Xu
2026-06-30  8:19 ` [RFC PATCH v2 6/7] migration: add support for fault thread to load pages from disk Aadeshveer Singh
2026-07-06 20:35   ` Peter Xu
2026-07-08 14:31     ` Aadeshveer Singh
2026-07-08 15:02       ` Peter Xu
2026-06-30  8:19 ` [RFC PATCH v2 7/7] migration: add eager load thread and setup for fast snapshot load Aadeshveer Singh
2026-07-06 21:07   ` Peter Xu
2026-07-06 19:16 ` [RFC PATCH v2 0/7] migration: " Peter Xu
2026-07-08 14:35   ` Aadeshveer Singh

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=ak5lMYNLxdTA7l2l@x1.local \
    --to=peterx@redhat.com \
    --cc=aadeshveer07@gmail.com \
    --cc=ayoub@saferwall.com \
    --cc=farosas@suse.de \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@mailo.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.