For reserved_va & ~MAP_FIXED mmap, linux-user and bsd-user translates it into a fixed mmap within [mmap_min_addr, reserved_va]. However, the previous implementation didn't care about where the address hint provided by user is greater than reserved_va and will run into an assertion failure.
This series fixed it for linux-user and bsd-user and added test coverage. For start > reserved_va, skip [start, reserved_va] and just search within [min_addr, reserved_va]. I actually thought that I am adding too many CC's and causing unnecessary noise but b4 is asking me to run auto-to-cc (: Signed-off-by: Bingwu Zhang <[email protected]> --- Bingwu Zhang (4): linux-user: Deal with mmap where start > reserved_va bsd-user: Deal with mmap where start > reserved_va tests/tcg/multiarch/test-mmap: Print more details tests/tcg/multiarch/test-mmap: Check mmaps beyond reserved_va bsd-user/mmap.c | 8 +++++--- linux-user/mmap.c | 9 ++++++--- tests/tcg/multiarch/test-mmap.c | 27 ++++++++++++++++++++++++--- 3 files changed, 35 insertions(+), 9 deletions(-) --- base-commit: d8a9d97317d03190b34498741f98f22e2a9afe3e change-id: 20260227-abyss-mmap-relocation-ccba2ab8902b Best regards, -- Bingwu Zhang <[email protected]>
