All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] linux-user: return ENOMEM from madvise on unmapped ranges
@ 2026-08-31 21:20 Roi Klevansky
  2026-08-31 21:20 ` [PATCH 1/2] " Roi Klevansky
  2026-08-31 21:20 ` [PATCH 2/2] tests/tcg: add linux-user test for madvise returning ENOMEM Roi Klevansky
  0 siblings, 2 replies; 3+ messages in thread
From: Roi Klevansky @ 2026-08-31 21:20 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Laurent Vivier, Helge Deller, Pierrick Bouvier,
	Roi Klevansky

The kernel fails madvise() with ENOMEM when it is given a partially or a
fully unmapped address range. qemu-user differed from this and returned
0 instead.

Patch 1 makes target_madvise() check the range with page_check_range()
and potentially fail with ENOMEM while still giving precedence to
advice specific errors.

Patch 2 adds test cases, calling madvise() with partially and fully
unmapped address ranges.

Roi Klevansky (2):
  linux-user: return ENOMEM from madvise on unmapped ranges
  tests/tcg: add linux-user test for madvise returning ENOMEM

 linux-user/mmap.c                         |  7 +++-
 tests/tcg/multiarch/linux/linux-madvise.c | 43 +++++++++++++++++++++++
 2 files changed, 49 insertions(+), 1 deletion(-)

-- 
2.55.0



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

end of thread, other threads:[~2026-08-31 23:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 21:20 [PATCH 0/2] linux-user: return ENOMEM from madvise on unmapped ranges Roi Klevansky
2026-08-31 21:20 ` [PATCH 1/2] " Roi Klevansky
2026-08-31 21:20 ` [PATCH 2/2] tests/tcg: add linux-user test for madvise returning ENOMEM Roi Klevansky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.