qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org, Alexey Sheplyakov <asheplyakov@yandex.ru>
Subject: Re: [PATCH] linux-user: Remove pgb_dynamic alignment assertion
Date: Thu, 15 Feb 2024 08:03:18 +0100	[thread overview]
Message-ID: <1bbd0968-e3be-4d8f-a64d-8565ca795fee@linaro.org> (raw)
In-Reply-To: <20240214045413.541677-1-richard.henderson@linaro.org>

On 14/2/24 05:54, Richard Henderson wrote:
> The assertion was never correct, because the alignment is a composite
> of the image alignment and SHMLBA.  Even if the alignment didn't match
> the image an assertion would not be correct -- more appropriate would
> be an error message about an ill formed image.  But the image cannot
> be held to SHMLBA under any circumstances.

Reported-by: Alexey Sheplyakov <asheplyakov@yandex.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> Fixes: ee94743034b ("linux-user: completely re-write init_guest_space")
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2157
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   linux-user/elfload.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index f3f1ab4f69..d92d66ca1e 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -3022,8 +3022,6 @@ static void pgb_dynamic(const char *image_name, uintptr_t guest_loaddr,
>       uintptr_t brk, ret;
>       PGBAddrs ga;
>   
> -    assert(QEMU_IS_ALIGNED(guest_loaddr, align));
> -
>       /* Try the identity map first. */
>       if (pgb_addr_set(&ga, guest_loaddr, guest_hiaddr, true)) {
>           brk = (uintptr_t)sbrk(0);



      reply	other threads:[~2024-02-15  7:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14  4:54 [PATCH] linux-user: Remove pgb_dynamic alignment assertion Richard Henderson
2024-02-15  7:03 ` Philippe Mathieu-Daudé [this message]

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=1bbd0968-e3be-4d8f-a64d-8565ca795fee@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=asheplyakov@yandex.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).