From: Roi Klevansky <roiklevansky@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Laurent Vivier" <laurent@vivier.eu>,
"Helge Deller" <deller@gmx.de>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Roi Klevansky" <roiklevansky@gmail.com>
Subject: [PATCH 0/2] linux-user: return ENOMEM from madvise on unmapped ranges
Date: Tue, 1 Sep 2026 00:20:38 +0300 [thread overview]
Message-ID: <20260831212040.1833650-1-roiklevansky@gmail.com> (raw)
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
next reply other threads:[~2026-08-31 23:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 21:20 Roi Klevansky [this message]
2026-08-31 21:20 ` [PATCH 1/2] linux-user: return ENOMEM from madvise on unmapped ranges Roi Klevansky
2026-08-31 21:20 ` [PATCH 2/2] tests/tcg: add linux-user test for madvise returning ENOMEM Roi Klevansky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260831212040.1833650-1-roiklevansky@gmail.com \
--to=roiklevansky@gmail.com \
--cc=alex.bennee@linaro.org \
--cc=deller@gmx.de \
--cc=laurent@vivier.eu \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.