From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
Lorenzo Stoakes <lstoakes@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Vlastimil Babka <vbabka@suse.cz>,
Matthew Wilcox <willy@infradead.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Eric Biederman <ebiederm@xmission.com>,
Kees Cook <kees@kernel.org>,
Suren Baghdasaryan <surenb@google.com>
Subject: Re: [RFC PATCH v2 4/7] mm: move internal core VMA manipulation functions to own file
Date: Wed, 3 Jul 2024 11:22:09 +0100 [thread overview]
Message-ID: <86fa5aa6-151c-45e3-ab8d-a268f7c090f8@lucifer.local> (raw)
In-Reply-To: <o3c66lbg2c43wtut6hyoruggdp65jdb22gtyn6scnycluevqs3@f2rzgmqlri2w>
On Tue, Jul 02, 2024 at 01:38:58PM GMT, Liam R. Howlett wrote:
> * Lorenzo Stoakes <lstoakes@gmail.com> [240628 10:35]:
> > This patch introduces vma.c and moves internal core VMA manipulation
> > functions to this file from mmap.c.
> >
> > This allows us to isolate VMA functionality in a single place such that we
> > can create userspace testing code that invokes this functionality in an
> > environment where we can implement simple unit tests of core functionality.
> >
> > This patch ensures that core VMA functionality is explicitly marked as such
> > by its presence in mm/vma.h.
> >
> > It also places the header includes required by vma.c in vma_internal.h,
> > which is simply imported by vma.c. This makes the VMA functionality
> > testable, as userland testing code can simply stub out functionality
> > as required.
> >
> > Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
> > ---
> > include/linux/mm.h | 35 -
> > mm/Makefile | 2 +-
> > mm/internal.h | 236 +-----
> > mm/mmap.c | 1981 +++-----------------------------------------
> > mm/mmu_notifier.c | 2 +
> > mm/vma.c | 1766 +++++++++++++++++++++++++++++++++++++++
> > mm/vma.h | 362 ++++++++
> > mm/vma_internal.h | 52 ++
> > 8 files changed, 2293 insertions(+), 2143 deletions(-)
> > create mode 100644 mm/vma.c
> > create mode 100644 mm/vma.h
> > create mode 100644 mm/vma_internal.h
> >
>
> ...
>
> > diff --git a/mm/mmap.c b/mm/mmap.c
> > index d2eebbed87b9..721870f380bf 100644
> > --- a/mm/mmap.c
> > +++ b/mm/mmap.c
> > @@ -57,6 +57,7 @@
> > #include <trace/events/mmap.h>
> >
> > #include "internal.h"
> > +#include "vma.h"
>
> This isn't needed as internal.h includes vma.h in this revision.
Ugh yeah thought I caught all of them but clearly not. Will fix!
>
> >
> > #ifndef arch_mmap_check
> > #define arch_mmap_check(addr, len, flags) (0)
>
> ...
>
> Thanks,
> Liam
next prev parent reply other threads:[~2024-07-03 10:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 14:35 [RFC PATCH v2 0/7] Make core VMA operations internal and testable Lorenzo Stoakes
2024-06-28 14:35 ` [RFC PATCH v2 1/7] userfaultfd: move core VMA manipulation logic to mm/userfaultfd.c Lorenzo Stoakes
2024-06-28 14:35 ` [RFC PATCH v2 2/7] mm: move vma_modify() and helpers to internal header Lorenzo Stoakes
2024-06-28 14:35 ` [RFC PATCH v2 3/7] mm: move vma_shrink(), vma_expand() " Lorenzo Stoakes
2024-07-02 17:24 ` Liam R. Howlett
2024-07-03 10:02 ` Lorenzo Stoakes
2024-06-28 14:35 ` [RFC PATCH v2 4/7] mm: move internal core VMA manipulation functions to own file Lorenzo Stoakes
2024-07-02 17:38 ` Liam R. Howlett
2024-07-03 10:22 ` Lorenzo Stoakes [this message]
2024-06-28 14:35 ` [RFC PATCH v2 5/7] MAINTAINERS: Add entry for new VMA files Lorenzo Stoakes
2024-07-02 23:19 ` SeongJae Park
2024-07-03 10:23 ` Lorenzo Stoakes
2024-06-28 14:35 ` [RFC PATCH v2 6/7] tools: separate out shared radix-tree components Lorenzo Stoakes
2024-06-28 14:35 ` [RFC PATCH v2 7/7] tools: add skeleton code for userland testing of VMA logic Lorenzo Stoakes
2024-07-02 23:25 ` SeongJae Park
2024-07-03 10:23 ` Lorenzo Stoakes
2024-07-03 10:25 ` [RFC PATCH v2 0/7] Make core VMA operations internal and testable Lorenzo Stoakes
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=86fa5aa6-151c-45e3-ab8d-a268f7c090f8@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=ebiederm@xmission.com \
--cc=jack@suse.cz \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).