Skip to content

Commit

Permalink
linux-user: Remove pgb_dynamic alignment assertion
Browse files Browse the repository at this point in the history
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: ee94743 ("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>
  • Loading branch information
rth7680 committed Feb 22, 2024
1 parent 097171a commit a06efc2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions linux-user/elfload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a06efc2

Please sign in to comment.