All of lore.kernel.org
 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 5/9] mm: introduce copy-on-fork VMAs and make VM_MAYBE_GUARD one
Date: Wed, 19 Nov 2025 10:17:13 +0100	[thread overview]
Message-ID: <dfba107a-21fd-4439-ad6f-bd8a976fb232@kernel.org> (raw)
In-Reply-To: <5d41b24e7bc622cda0af92b6d558d7f4c0d1bc8c.1763460113.git.lorenzo.stoakes@oracle.com>

On 18.11.25 11:17, Lorenzo Stoakes wrote:
> Gather all the VMA flags whose presence implies that page tables must be
> copied on fork into a single bitmap - VM_COPY_ON_FORK - and use this
> rather than specifying individual flags in vma_needs_copy().
> 
> We also add VM_MAYBE_GUARD to this list, as it being set on a VMA implies
> that there may be metadata contained in the page tables (that is - guard
> markers) which would will not and cannot be propagated upon fork.
> 
> This was already being done manually previously in vma_needs_copy(), but
> this makes it very explicit, alongside VM_PFNMAP, VM_MIXEDMAP and
> VM_UFFD_WP all of which imply the same.
> 
> Note that VM_STICKY flags ought generally to be marked VM_COPY_ON_FORK too
> - because equally a flag being VM_STICKY indicates that the VMA contains
> metadat that is not propagated by being faulted in - i.e.  that the VMA
> metadata does not fully describe the VMA alone, and thus we must propagate
> whatever metadata there is on a fork.
> 
> However, for maximum flexibility, we do not make this necessarily the case
> here.
> 
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> Reviewed-by: Pedro Falcato <pfalcato@suse.de>
> Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
> ---

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

-- 
Cheers

David

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

Thread overview: 24+ 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)
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) [this message]
2026-01-13 23:12   ` Chris Mason
2026-01-14 10:27     ` Lorenzo Stoakes
2026-01-14 11:32       ` Lorenzo Stoakes
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
  -- strict thread matches above, loose matches on Subject: below --
2026-05-15 12:42 [PATCH 6.18.y v4 0/9] mm: backport sticky VMA flags and soft-dirty fix Ahmed Elaidy
2026-05-15 12:42 ` [PATCH v4 5/9] mm: introduce copy-on-fork VMAs and make VM_MAYBE_GUARD one Ahmed Elaidy

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=dfba107a-21fd-4439-ad6f-bd8a976fb232@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 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.