]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
linux-user: Remove pgb_dynamic alignment assertion
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 14 Feb 2024 04:18:01 +0000 (04:18 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 5 Mar 2024 14:41:31 +0000 (17:41 +0300)
The assertion was never correct, because the alignment is a composite
of the image alignment and SHMLBA.  Even if the image alignment didn't
match the image address, 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.

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>
Reported-by: Alexey Sheplyakov <asheplyakov@yandex.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit b816e1b5ba58a986b10cd830d6617f351979ab91)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
linux-user/elfload.c

index cf9e74468b11c7dd35dc6e6c3c57ef9d6336d01d..7cc8d9685efdd2a8e80070aeaa7dcd01bb673206 100644 (file)
@@ -3016,8 +3016,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);