From: Bert Karwatzki <spasswolf@web.de>
To: "Liam R . Howlett" <Liam.Howlett@oracle.com>
Cc: Bert Karwatzki <spasswolf@web.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org
Subject: Re: [PATCH v2 00/15] Avoid MAP_FIXED gap exposure
Date: Thu, 27 Jun 2024 11:31:35 +0200 [thread overview]
Message-ID: <20240627093138.11420-1-spasswolf@web.de> (raw)
In-Reply-To: nlq44eay3zjapg23tjprukm7w2ae6qcy5xtc5xsxogsmd52lwu@fhfzf4l6777u
* Andrew Morton <akpm@linux-foundation.org> [240626 16:59]:
> On Tue, 25 Jun 2024 15:11:30 -0400 "Liam R. Howlett" <Liam.Howlett@oracle.com> wrote:
>
> > It is now possible to walk the vma tree using the rcu read locks and is
> > beneficial to do so to reduce lock contention. Doing so while a
> > MAP_FIXED mapping is executing means that a reader may see a gap in the
> > vma tree that should never logically exist - and does not when using the
> > mmap lock in read mode. The temporal gap exists because mmap_region()
> > calls munmap() prior to installing the new mapping.
>
> What are the consequences when this race hits? IOW, why do we need to
> change anything?
>
If I understand this correctly the plan is to replace mmap_read_lock(mm) by
rcu_read_lock(). So the consequences of a visible gap could be tested by
replacing mmap_read_lock(mm) by rcu_read_lock() within the old code. If this is
the case I'm willing to test it.
Bert Karwatzki
next reply other threads:[~2024-06-27 9:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 9:31 Bert Karwatzki [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-07-04 21:50 Bert Karwatzki
2024-07-04 21:15 Bert Karwatzki
2024-07-04 21:07 Bert Karwatzki
2024-07-03 14:30 Bert Karwatzki
2024-07-04 18:31 ` Liam R. Howlett
2024-07-03 10:13 Bert Karwatzki
2024-07-03 13:53 ` Liam R. Howlett
2024-06-25 19:11 Liam R. Howlett
2024-06-26 20:58 ` Andrew Morton
2024-06-27 1:15 ` Liam R. Howlett
2024-06-27 1:28 ` Andrew Morton
2024-06-27 13:31 ` Liam R. Howlett
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=20240627093138.11420-1-spasswolf@web.de \
--to=spasswolf@web.de \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox