[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 36/60] linux-user: Fix sub-host-page mmap
From: |
Richard Henderson |
Subject: |
[PATCH 36/60] linux-user: Fix sub-host-page mmap |
Date: |
Fri, 1 Mar 2024 13:05:55 -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
- [PATCH 34/60] linux-user: Split out target_mmap__locked, (continued)
- [PATCH 34/60] linux-user: Split out target_mmap__locked, Richard Henderson, 2024/03/01
- [PATCH 21/60] linux-user: Remove qemu_host_page_size from create_elf_tables, Richard Henderson, 2024/03/01
- [PATCH 22/60] linux-user/hppa: Simplify init_guest_commpage, Richard Henderson, 2024/03/01
- [PATCH 24/60] linux-user/arm: Remove qemu_host_page_size from init_guest_commpage, Richard Henderson, 2024/03/01
- [PATCH 30/60] hw/tpm: Remove HOST_PAGE_ALIGN from tpm_ppi_init, Richard Henderson, 2024/03/01
- [PATCH 32/60] softmmu/physmem: Remove HOST_PAGE_ALIGN, Richard Henderson, 2024/03/01
- [PATCH 10/60] linux-user/elfload: Write corefile elf header in one block, Richard Henderson, 2024/03/01
- [PATCH 17/60] tcg: Avoid double lock if page tables happen to be in mmio memory., Richard Henderson, 2024/03/01
- [PATCH 29/60] migration: Remove qemu_host_page_size, Richard Henderson, 2024/03/01
- [PATCH 31/60] softmmu/physmem: Remove qemu_host_page_size, Richard Henderson, 2024/03/01
- [PATCH 36/60] linux-user: Fix sub-host-page mmap,
Richard Henderson <=
- [PATCH 38/60] linux-user: Do early mmap placement only for reserved_va, Richard Henderson, 2024/03/01
- [PATCH 39/60] linux-user: Split out do_munmap, Richard Henderson, 2024/03/01
- [PATCH 41/60] linux-user: Split out mmap_h_eq_g, Richard Henderson, 2024/03/01
- [PATCH 45/60] tests/tcg: Extend file in linux-madvise.c, Richard Henderson, 2024/03/01
- [PATCH 42/60] linux-user: Split out mmap_h_lt_g, Richard Henderson, 2024/03/01
- [PATCH 50/60] target/arm: Enable TARGET_PAGE_BITS_VARY for AArch64 user-only, Richard Henderson, 2024/03/01
- [PATCH 47/60] cpu: Remove page_size_init, Richard Henderson, 2024/03/01
- [PATCH 40/60] linux-user: Use do_munmap for target_mmap failure, Richard Henderson, 2024/03/01
- [PATCH 51/60] linux-user: Bound mmap_min_addr by host page size, Richard Henderson, 2024/03/01
- [PATCH 57/60] linux-user/loongarch64: Remove TARGET_FORCE_SHMLBA, Richard Henderson, 2024/03/01