From: Anthony PERARD <anthony.perard@vates.tech>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
Juergen Gross <jgross@suse.com>,
Oleksii Kurochko <oleksii.kurochko@gmail.com>
Subject: Re: [PATCH for-4.19] tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment()
Date: Thu, 27 Jun 2024 13:46:37 +0000 [thread overview]
Message-ID: <Zn1tO2h6aps4Dwdc@l14> (raw)
In-Reply-To: <20240627130134.1006059-1-andrew.cooper3@citrix.com>
On Thu, Jun 27, 2024 at 02:01:34PM +0100, Andrew Cooper wrote:
> xc_dom_alloc_segment() is passed a size in bytes, calculates a size in pages
> from it, then fills in the new segment information with a bytes value
> re-calculated from the number of pages.
>
> This causes the module information given to the guest (MB, or PVH) to have
> incorrect sizes; specifically, sizes rounded up to the next page.
>
> This in turn is problematic for Xen. When Xen finds a gzipped module, it
> peeks at the end metadata to judge the decompressed size, which is a -4
> backreference from the reported end of the module.
>
> Fill in seg->vend using the correct number of bytes.
>
> Fixes: ea7c8a3d0e82 ("libxc: reorganize domain builder guest memory allocator")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
>
> For 4.19: This was discovered when trying to test Daniel's gzip cleanup for
> Hyperlaunch. It's a subtle bug, hidden inside a second bug which isn't
> appropriate content for 4.20.
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
Thanks,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
next prev parent reply other threads:[~2024-06-27 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 13:01 [PATCH for-4.19] tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() Andrew Cooper
2024-06-27 13:46 ` Anthony PERARD [this message]
2024-06-27 14:26 ` oleksii.kurochko
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=Zn1tO2h6aps4Dwdc@l14 \
--to=anthony.perard@vates.tech \
--cc=andrew.cooper3@citrix.com \
--cc=jgross@suse.com \
--cc=oleksii.kurochko@gmail.com \
--cc=xen-devel@lists.xenproject.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.