linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Vlastimil Babka <vbabka@suse.cz>,
	"Liam R . Howlett" <Liam.Howlett@oracle.com>,
	Jann Horn <jannh@google.com>, Pedro Falcato <pfalcato@suse.de>,
	David Hildenbrand <david@redhat.com>, Kees Cook <kees@kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	Suren Baghdasaryan <surenb@google.com>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/4] mm: perform VMA allocation, freeing, duplication in mm
Date: Thu, 1 May 2025 11:38:16 +0100	[thread overview]
Message-ID: <bd42b6fd-77b9-43cd-8e30-b6d38d5e39e3@lucifer.local> (raw)
In-Reply-To: <20250430144236.1877ef24177b40cc6a007874@linux-foundation.org>

On Wed, Apr 30, 2025 at 02:42:36PM -0700, Andrew Morton wrote:
> On Wed, 30 Apr 2025 10:20:10 +0100 Lorenzo Stoakes <lorenzo.stoakes@oracle.com> wrote:
>
> > On Tue, Apr 29, 2025 at 09:22:59AM +0200, Vlastimil Babka wrote:
> > > On 4/28/25 17:28, Lorenzo Stoakes wrote:
> > > > Right now these are performed in kernel/fork.c which is odd and a violation
> > > > of separation of concerns, as well as preventing us from integrating this
> > > > and related logic into userland VMA testing going forward, and perhaps more
> > > > importantly - enabling us to, in a subsequent commit, make VMA
> > > > allocation/freeing a purely internal mm operation.
> > >
> > > I wonder if the last part is from an earlier version and now obsolete
> > > because there's not subsequent commit in this series and the placement of
> > > alloc/freeing in vma_init.c seems making those purely internal mm operations
> > > already? Or do you mean some further plans?
> > >
> >
> > Sorry, missed this!
> >
> > Andrew - could we delete the last part of this sentence so it reads:
> >
> > Right now these are performed in kernel/fork.c which is odd and a violation
> > of separation of concerns, as well as preventing us from integrating this
> > and related logic into userland VMA testing going forward.
>
> Sure.  The result:
>
> : Right now these are performed in kernel/fork.c which is odd and a
> : violation of separation of concerns, as well as preventing us from
> : integrating this and related logic into userland VMA testing going
> : forward.
> :
> : There is a fly in the ointment - nommu - mmap.c is not compiled if
> : CONFIG_MMU not set, and neither is vma.c.
> :
> : To square the circle, let's add a new file - vma_init.c.  This will be
> : compiled for both CONFIG_MMU and nommu builds, and will also form part of
> : the VMA userland testing.
> :
> : This allows us to de-duplicate code, while maintaining separation of
> : concerns and the ability for us to userland test this logic.
> :
> : Update the VMA userland tests accordingly, additionally adding a
> : detach_free_vma() helper function to correctly detach VMAs before freeing
> : them in test code, as this change was triggering the assert for this.
>

Perfect, thanks!


  reply	other threads:[~2025-05-01 10:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-28 15:28 [PATCH v3 0/4] move all VMA allocation, freeing and duplication logic to mm Lorenzo Stoakes
2025-04-28 15:28 ` [PATCH v3 1/4] mm: establish mm/vma_exec.c for shared exec/mm VMA functionality Lorenzo Stoakes
2025-04-28 19:12   ` Liam R. Howlett
2025-04-28 20:14     ` Suren Baghdasaryan
2025-04-28 20:26       ` Lorenzo Stoakes
2025-04-28 23:08         ` Andrew Morton
2025-04-29  6:59   ` Vlastimil Babka
2025-04-29 16:53   ` Kees Cook
2025-04-29 17:22   ` David Hildenbrand
2025-04-29 17:48   ` Pedro Falcato
2025-04-28 15:28 ` [PATCH v3 2/4] mm: abstract initial stack setup to mm subsystem Lorenzo Stoakes
2025-04-28 19:12   ` Liam R. Howlett
2025-04-29  7:04   ` Vlastimil Babka
2025-04-29 16:54   ` Kees Cook
2025-04-29 17:48   ` Pedro Falcato
2025-04-28 15:28 ` [PATCH v3 3/4] mm: move dup_mmap() to mm Lorenzo Stoakes
2025-04-28 19:12   ` Liam R. Howlett
2025-04-28 23:31     ` Suren Baghdasaryan
2025-04-29  7:12   ` Vlastimil Babka
2025-04-29 16:54   ` Kees Cook
2025-04-29 17:23   ` David Hildenbrand
2025-04-28 15:28 ` [PATCH v3 4/4] mm: perform VMA allocation, freeing, duplication in mm Lorenzo Stoakes
2025-04-28 19:14   ` Liam R. Howlett
2025-04-28 20:28     ` Lorenzo Stoakes
2025-04-28 20:29   ` Lorenzo Stoakes
2025-04-29  7:22   ` Vlastimil Babka
2025-04-30  9:20     ` Lorenzo Stoakes
2025-04-30 21:42       ` Andrew Morton
2025-05-01 10:38         ` Lorenzo Stoakes [this message]
2025-04-29 15:04   ` Suren Baghdasaryan
2025-04-29 16:54   ` Kees Cook
2025-04-29 17:24   ` David Hildenbrand
2025-04-29 17:47   ` Pedro Falcato
2025-04-29  7:28 ` [PATCH v3 0/4] move all VMA allocation, freeing and duplication logic to mm Vlastimil Babka
2025-04-29 10:23   ` Lorenzo Stoakes
2025-04-29 16:55     ` Kees Cook

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=bd42b6fd-77b9-43cd-8e30-b6d38d5e39e3@lucifer.local \
    --to=lorenzo.stoakes@oracle.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=david@redhat.com \
    --cc=jack@suse.cz \
    --cc=jannh@google.com \
    --cc=kees@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pfalcato@suse.de \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=viro@zeniv.linux.org.uk \
    /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