qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] linux-user: brk() syscall fixes and armhf static binary fix
@ 2023-07-17 21:35 Helge Deller
  2023-07-17 21:35 ` [PATCH 1/6] Revert "linux-user: Make sure initial brk(0) is page-aligned" Helge Deller
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Helge Deller @ 2023-07-17 21:35 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel, Michael Tokarev, Richard Henderson
  Cc: Helge Deller

Commit 86f04735ac ("linux-user: Fix brk() to release pages") introduced the
possibility for userspace applications to reduce memory footprint by calling
brk() with a lower address and free up memory.
This change introduced some failures for applications with errors like
- accesing bytes above the brk heap address on the same page,
- freeing memory below the initial brk address,
and introduced a behaviour which isn't done by the kernel (e.g. zeroing
memory above brk).

This patch set fixes those issues and have been tested with existing
programs (e.g. upx).

Additionally it includes one patch to allow running static armhf executables
(e.g. fstype) which was broken since qemu-8.0.

Helge

Helge Deller (6):
  Revert "linux-user: Make sure initial brk(0) is page-aligned"
  linux-user: Fix qemu brk() to not zero bytes on current page
  linux-user: Prohibit brk() to to shrink below initial heap address
  linux-user: Fix signed math overflow in brk() syscall
  linux-user: Fix strace output for old_mmap
  linux-user: Fix qemu-arm to run static armhf binaries

 linux-user/elfload.c |  7 +++++++
 linux-user/strace.c  | 49 ++++++++++++++++++++++++++++++++++++++++----
 linux-user/syscall.c | 25 +++++++++++++---------
 3 files changed, 67 insertions(+), 14 deletions(-)

--
2.41.0



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-07-19 11:40 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 21:35 [PATCH 0/6] linux-user: brk() syscall fixes and armhf static binary fix Helge Deller
2023-07-17 21:35 ` [PATCH 1/6] Revert "linux-user: Make sure initial brk(0) is page-aligned" Helge Deller
2023-07-18 13:53   ` Andreas Schwab
2023-07-18 15:47     ` Helge Deller
2023-07-17 21:35 ` [PATCH 2/6] linux-user: Fix qemu brk() to not zero bytes on current page Helge Deller
2023-07-17 21:35 ` [PATCH 3/6] linux-user: Prohibit brk() to to shrink below initial heap address Helge Deller
2023-07-17 21:35 ` [PATCH 4/6] linux-user: Fix signed math overflow in brk() syscall Helge Deller
2023-07-17 22:02   ` Philippe Mathieu-Daudé
2023-07-18 18:18     ` Helge Deller
2023-07-17 21:35 ` [PATCH 5/6] linux-user: Fix strace output for old_mmap Helge Deller
2023-07-17 21:35 ` [PATCH 6/6] linux-user: Fix qemu-arm to run static armhf binaries Helge Deller
2023-07-18  4:19   ` Michael Tokarev
2023-07-17 21:43 ` [PATCH 0/6] linux-user: brk() syscall fixes and armhf static binary fix Philippe Mathieu-Daudé
2023-07-18  3:03 ` Song Gao
2023-07-18  5:42   ` Helge Deller
2023-07-18  7:25     ` Song Gao
2023-07-18  8:30   ` Michael Tokarev
2023-07-19 11:39     ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).