[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/39] linux-user: Fix sub-host-page mmap
From: |
Richard Henderson |
Subject: |
[PULL 21/39] linux-user: Fix sub-host-page mmap |
Date: |
Thu, 22 Feb 2024 10:43:05 -1000 |
We cannot skip over the_end1 to the_end, because we fail to
record the validity of the guest page with the interval tree.
Remove "the_end" and rename "the_end1" to "the_end".
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20240102015808.132373-19-richard.henderson@linaro.org>
---
linux-user/mmap.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index fbaea832c5..48fcdd4a32 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -643,7 +643,7 @@ static abi_long target_mmap__locked(abi_ulong start,
abi_ulong len,
target_prot, flags, fd, offset)) {
return -1;
}
- goto the_end1;
+ goto the_end;
}
if (!mmap_frag(real_start, start,
real_start + host_page_size - 1,
@@ -690,7 +690,7 @@ static abi_long target_mmap__locked(abi_ulong start,
abi_ulong len,
passthrough_last = real_last;
}
}
- the_end1:
+ the_end:
if (flags & MAP_ANONYMOUS) {
page_flags |= PAGE_ANON;
}
@@ -708,7 +708,6 @@ static abi_long target_mmap__locked(abi_ulong start,
abi_ulong len,
}
}
shm_region_rm_complete(start, last);
- the_end:
trace_target_mmap_complete(start);
if (qemu_loglevel_mask(CPU_LOG_PAGE)) {
FILE *f = qemu_log_trylock();
--
2.34.1
- [PULL 11/39] linux-user: Remove qemu_host_page_{size, mask} from mmap.c, (continued)
- [PULL 11/39] linux-user: Remove qemu_host_page_{size, mask} from mmap.c, Richard Henderson, 2024/02/22
- [PULL 12/39] linux-user: Remove REAL_HOST_PAGE_ALIGN from mmap.c, Richard Henderson, 2024/02/22
- [PULL 13/39] linux-user: Remove HOST_PAGE_ALIGN from mmap.c, Richard Henderson, 2024/02/22
- [PULL 14/39] migration: Remove qemu_host_page_size, Richard Henderson, 2024/02/22
- [PULL 15/39] hw/tpm: Remove HOST_PAGE_ALIGN from tpm_ppi_init, Richard Henderson, 2024/02/22
- [PULL 16/39] softmmu/physmem: Remove qemu_host_page_size, Richard Henderson, 2024/02/22
- [PULL 17/39] softmmu/physmem: Remove HOST_PAGE_ALIGN, Richard Henderson, 2024/02/22
- [PULL 18/39] linux-user: Remove qemu_host_page_size from main, Richard Henderson, 2024/02/22
- [PULL 19/39] linux-user: Split out target_mmap__locked, Richard Henderson, 2024/02/22
- [PULL 20/39] linux-user: Move some mmap checks outside the lock, Richard Henderson, 2024/02/22
- [PULL 21/39] linux-user: Fix sub-host-page mmap,
Richard Henderson <=
- [PULL 23/39] linux-user: Do early mmap placement only for reserved_va, Richard Henderson, 2024/02/22
- [PULL 22/39] linux-user: Split out mmap_end, Richard Henderson, 2024/02/22
- [PULL 25/39] linux-user: Use do_munmap for target_mmap failure, Richard Henderson, 2024/02/22
- [PULL 24/39] linux-user: Split out do_munmap, Richard Henderson, 2024/02/22
- [PULL 26/39] linux-user: Split out mmap_h_eq_g, Richard Henderson, 2024/02/22
- [PULL 27/39] linux-user: Split out mmap_h_lt_g, Richard Henderson, 2024/02/22
- [PULL 28/39] linux-user: Split out mmap_h_gt_g, Richard Henderson, 2024/02/22
- [PULL 30/39] tests/tcg: Extend file in linux-madvise.c, Richard Henderson, 2024/02/22
- [PULL 29/39] tests/tcg: Remove run-test-mmap-*, Richard Henderson, 2024/02/22
- [PULL 31/39] *-user: Deprecate and disable -p pagesize, Richard Henderson, 2024/02/22