• Richard Henderson's avatar
    linux-user: Fix mmap_find_vma returning invalid addresses. · 14f24e14
    Richard Henderson authored
    Don't return addresses that aren't properly aligned for the guest,
    e.g. when the guest has a larger page size than the host.  Don't
    return addresses that are outside the virtual address space for the
    target, by paying proper attention to the h2g/g2h macros.
    At the same time, place the default mapping base for 64-bit guests
    (on 64-bit hosts) outside the low 4G.  Consistently interpret
    mmap_next_start in the guest address space.
    Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
mmap.c 21.4 KB