[PATCH for-8.1 0/2] linux-user: Fix MAP_SHARED_VALIDATE, MAP_FIXED_NOREPLACE

Richard Henderson posted 2 patches 9 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230808025542.50392-1-richard.henderson@linaro.org
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Laurent Vivier <laurent@vivier.eu>
bsd-user/syscall_defs.h   |  2 +
include/exec/user/thunk.h | 15 ++++--
linux-user/syscall.c      | 96 +++++++++++++++++++++++++++++----------
linux-user/thunk.c        | 24 +++++-----
4 files changed, 98 insertions(+), 39 deletions(-)
[PATCH for-8.1 0/2] linux-user: Fix MAP_SHARED_VALIDATE, MAP_FIXED_NOREPLACE
Posted by Richard Henderson 9 months, 2 weeks ago
Fixes LTP mmap17 (MAP_FIXED_NOREPLACE) and mmap20 (MAP_SHARED_VALIDATE),
both of which were added to linux-user during the 8.1 cycle, and so
would be nice to fix right away.

Does not fix mmap18, which will fail depending on the guest memory map.
The real kernel avoids placing new maps immediately prior to GROWSDOWN
regions (leaving them no room into which to expand) and qemu does not.
This is a long-standing problem and will not be fixable for 8.1.

Reported-by: Michael Tokarev <mjt@tls.msk.ru>


r~


Richard Henderson (2):
  linux-user: Split out do_mmap
  linux-user: Use ARRAY_SIZE with bitmask_transtbl

 bsd-user/syscall_defs.h   |  2 +
 include/exec/user/thunk.h | 15 ++++--
 linux-user/syscall.c      | 96 +++++++++++++++++++++++++++++----------
 linux-user/thunk.c        | 24 +++++-----
 4 files changed, 98 insertions(+), 39 deletions(-)

-- 
2.34.1