linux-user: Pass last not end to probe_guest_base
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 27 Mar 2023 20:31:01 +0000 (20:31 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 28 Mar 2023 22:23:10 +0000 (15:23 -0700)
commita3a67f54f0b4ec98ff2380a792e5bfeebc47d554
tree30fa3eb80bf614fe57a299287168aa13c15a4e15
parente506ad6a05c806bbef460a7d014a184ff8d707a6
linux-user: Pass last not end to probe_guest_base

Pass the address of the last byte of the image, rather than
the first address past the last byte.  This avoids overflow
when the last page of the address space is involved.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/elfload.c
linux-user/flatload.c
linux-user/user-internals.h