summary refs log tree commit diff stats
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2023-07-06 13:34:19 +0200
committerRichard Henderson <richard.henderson@linaro.org>2023-07-15 08:02:32 +0100
commitd28b3c90cfad1a7e211ae2bce36ecb9071086129 (patch)
treebbf032f4d07492a0477b9082009687842dc50ae0 /linux-user/syscall.c
parente18ed26ce785f74a17e6f3a095647e08ba6fc669 (diff)
downloadfocaccia-qemu-d28b3c90cfad1a7e211ae2bce36ecb9071086129.tar.gz
focaccia-qemu-d28b3c90cfad1a7e211ae2bce36ecb9071086129.zip
linux-user: Make sure initial brk(0) is page-aligned
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>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c2
1 files changed, 1 insertions, 1 deletions
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);
 }