[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/47] linux-user: Make sure initial brk(0) is page-aligned
From: |
Richard Henderson |
Subject: |
[PULL 20/47] linux-user: Make sure initial brk(0) is page-aligned |
Date: |
Sat, 15 Jul 2023 14:52:50 +0100 |
From: Andreas Schwab <schwab@suse.de>
Fixes: 86f04735ac ("linux-user: Fix brk() to release pages")
Signed-off-by: Andreas Schwab <schwab@suse.de>
Message-Id: <mvmpm55qnno.fsf@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/syscall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index b78eb686d8..02d3b6c90a 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -806,7 +806,7 @@ static abi_ulong brk_page;
void target_set_brk(abi_ulong new_brk)
{
- target_brk = new_brk;
+ target_brk = TARGET_PAGE_ALIGN(new_brk);
brk_page = HOST_PAGE_ALIGN(target_brk);
}
--
2.34.1
- [PULL 04/47] linux-user: Use abi_int not int32_t in syscall_defs.h, (continued)
- [PULL 04/47] linux-user: Use abi_int not int32_t in syscall_defs.h, Richard Henderson, 2023/07/15
- [PULL 06/47] linux-user: Use abi_llong not int64_t in syscall_defs.h, Richard Henderson, 2023/07/15
- [PULL 05/47] linux-user: Use abi_ullong not uint64_t in syscall_defs.h, Richard Henderson, 2023/07/15
- [PULL 02/47] linux-user: Remove #if 0 block in syscall_defs.h, Richard Henderson, 2023/07/15
- [PULL 09/47] linux-user: Use abi_llong not long long in syscall_defs.h, Richard Henderson, 2023/07/15
- [PULL 13/47] linux-user: Use abi_uint not unsigned in syscall_defs.h, Richard Henderson, 2023/07/15
- [PULL 15/47] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for nios2, Richard Henderson, 2023/07/15
- [PULL 25/47] linux-user: Populate more bits in mmap_flags_tbl, Richard Henderson, 2023/07/15
- [PULL 30/47] linux-user: Widen target_mmap offset argument to off_t, Richard Henderson, 2023/07/15
- [PULL 10/47] linux-user: Use abi_int not int in syscall_defs.h, Richard Henderson, 2023/07/15
- [PULL 20/47] linux-user: Make sure initial brk(0) is page-aligned,
Richard Henderson <=
- [PULL 36/47] linux-user: Use 'last' instead of 'end' in target_mmap, Richard Henderson, 2023/07/15
- [PULL 17/47] linux-user: Fix do_shmat type errors, Richard Henderson, 2023/07/15
- [PULL 19/47] tcg: Fix info_in_idx increment in layout_arg_by_ref, Richard Henderson, 2023/07/15
- [PULL 14/47] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for microblaze, Richard Henderson, 2023/07/15
- [PULL 16/47] linux-user/syscall: Implement execve without execveat, Richard Henderson, 2023/07/15
- [PULL 27/47] bsd-user: Use page_check_range_empty for MAP_EXCL, Richard Henderson, 2023/07/15