linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "David Hildenbrand (Red Hat)" <david@kernel.org>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
	"Liam R . Howlett" <Liam.Howlett@oracle.com>,
	Vlastimil Babka <vbabka@suse.cz>, Mike Rapoport <rppt@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Jann Horn <jannh@google.com>, Pedro Falcato <pfalcato@suse.de>,
	Zi Yan <ziy@nvidia.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Nico Pache <npache@redhat.com>,
	Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
	Barry Song <baohua@kernel.org>, Lance Yang <lance.yang@linux.dev>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-mm@kvack.org,
	linux-trace-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, Andrei Vagin <avagin@gmail.com>
Subject: Re: [PATCH v4 2/9] mm: add atomic VMA flags and set VM_MAYBE_GUARD as such
Date: Wed, 19 Nov 2025 10:06:39 +0100	[thread overview]
Message-ID: <9b18ee75-bf06-46d7-96f3-395cb159217b@kernel.org> (raw)
In-Reply-To: <97e57abed09f2663077ed7a36fb8206e243171a9.1763460113.git.lorenzo.stoakes@oracle.com>

On 18.11.25 11:17, Lorenzo Stoakes wrote:
> This patch adds the ability to atomically set VMA flags with only the mmap
> read/VMA read lock held.
> 
> As this could be hugely problematic for VMA flags in general given that
> all other accesses are non-atomic and serialised by the mmap/VMA locks, we
> implement this with a strict allow-list - that is, only designated flags
> are allowed to do this.
> 
> We make VM_MAYBE_GUARD one of these flags.
> 
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> Reviewed-by: Pedro Falcato <pfalcato@suse.de>
> Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
> ---

IIUC all other flag modifications need a write lock, so this should just 
work.

Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>

-- 
Cheers

David


  reply	other threads:[~2025-11-19  9:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18 10:17 [PATCH v4 0/9] introduce VM_MAYBE_GUARD and make it sticky Lorenzo Stoakes
2025-11-18 10:17 ` [PATCH v4 1/9] mm: introduce VM_MAYBE_GUARD and make visible in /proc/$pid/smaps Lorenzo Stoakes
2025-11-20  5:48   ` Lance Yang
2025-11-18 10:17 ` [PATCH v4 2/9] mm: add atomic VMA flags and set VM_MAYBE_GUARD as such Lorenzo Stoakes
2025-11-19  9:06   ` David Hildenbrand (Red Hat) [this message]
2025-11-20  6:11   ` Lance Yang
2025-11-18 10:17 ` [PATCH v4 3/9] mm: update vma_modify_flags() to handle residual flags, document Lorenzo Stoakes
2025-11-19 16:27   ` Vlastimil Babka
2025-11-19 16:36   ` Pedro Falcato
2025-11-18 10:17 ` [PATCH v4 4/9] mm: implement sticky VMA flags Lorenzo Stoakes
2025-11-21 16:09   ` David Hildenbrand (Red Hat)
2025-11-18 10:17 ` [PATCH v4 5/9] mm: introduce copy-on-fork VMAs and make VM_MAYBE_GUARD one Lorenzo Stoakes
2025-11-19  9:17   ` David Hildenbrand (Red Hat)
2025-11-18 10:17 ` [PATCH v4 6/9] mm: set the VM_MAYBE_GUARD flag on guard region install Lorenzo Stoakes
2025-11-19  9:16   ` David Hildenbrand (Red Hat)
2025-11-19  9:27     ` Lorenzo Stoakes
2025-11-18 10:17 ` [PATCH v4 7/9] tools/testing/vma: add VMA sticky userland tests Lorenzo Stoakes
2025-11-18 10:17 ` [PATCH v4 8/9] tools/testing/selftests/mm: add MADV_COLLAPSE test case Lorenzo Stoakes
2025-11-18 10:17 ` [PATCH v4 9/9] tools/testing/selftests/mm: add smaps visibility guard region test Lorenzo Stoakes
2025-11-18 17:33 ` [PATCH v4 0/9] introduce VM_MAYBE_GUARD and make it sticky Andrew Morton

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=9b18ee75-bf06-46d7-96f3-395cb159217b@kernel.org \
    --to=david@kernel.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@gmail.com \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=corbet@lwn.net \
    --cc=dev.jain@arm.com \
    --cc=jannh@google.com \
    --cc=lance.yang@linux.dev \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=mhocko@suse.com \
    --cc=npache@redhat.com \
    --cc=pfalcato@suse.de \
    --cc=rostedt@goodmis.org \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=ziy@nvidia.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