From: "Ricardo B. Marlière via ltp" <ltp@lists.linux.it>
To: "Andrea Cervesato" <andrea.cervesato@suse.com>,
"Ricardo B. Marlière" <rbm@suse.com>,
"Linux Test Project" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 3/3] syscalls: munmap03: Convert to new API
Date: Fri, 04 Jul 2025 13:35:15 -0300 [thread overview]
Message-ID: <DB3F0C75MAF0.3TBFSF17YH388@suse.com> (raw)
In-Reply-To: <3598e02d-bb1c-45cb-8f17-6a5e47b46e91@suse.com>
On Fri Jul 4, 2025 at 1:26 PM -03, Andrea Cervesato wrote:
> On 7/4/25 5:23 PM, Ricardo B. Marlière wrote:
>> Most of those are for mmap. The only one left seems to be ENOMEM, which
>> I don't think it's viable to test. WDYT?
> I guess you mean:
>
> ENOMEM The process's maximum number of mappings would have been
> exceeded. This error can also occur for munmap(), when
> unmapping a region in the middle of an existing mapping,
> since this results in two smaller mappings on either side
>
> of the region being unmapped.
>
> Luckily it is testable, but we need a new test for that. What we can do
> is to read
> https://docs.kernel.org/admin-guide/sysctl/vm.html#max-map-count and to
> map the maximum amount of memory map areas. Then we munmap() in the
> middle of one of them, resulting in +1 mapped areas and obtaining ENOMEM
> from the syscall. Feel free to explore it.
>
Thanks for the pointers, I'll give it a shot 8-)
> - Andrea
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2025-07-04 16:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 18:39 [LTP] [PATCH 0/3] syscalls: munmap: Convert to new API Ricardo B. Marlière via ltp
2025-07-03 18:39 ` [LTP] [PATCH 1/3] syscalls: munmap01: " Ricardo B. Marlière via ltp
2025-07-04 12:03 ` Andrea Cervesato via ltp
2025-07-04 12:31 ` Ricardo B. Marlière via ltp
2025-07-04 12:07 ` Andrea Cervesato via ltp
2025-07-03 18:39 ` [LTP] [PATCH 2/3] syscalls: munmap02: Make it a variant of munmap01 Ricardo B. Marlière via ltp
2025-07-03 18:39 ` [LTP] [PATCH 3/3] syscalls: munmap03: Convert to new API Ricardo B. Marlière via ltp
2025-07-04 12:14 ` Andrea Cervesato via ltp
2025-07-04 15:23 ` Ricardo B. Marlière via ltp
2025-07-04 16:26 ` Andrea Cervesato via ltp
2025-07-04 16:35 ` Ricardo B. Marlière via ltp [this message]
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=DB3F0C75MAF0.3TBFSF17YH388@suse.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--cc=rbm@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox