From: Lorenzo Stoakes <ljs@kernel.org>
To: Pedro Falcato <pfalcato@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Russell King <linux@armlinux.org.uk>,
Dinh Nguyen <dinguyen@kernel.org>,
Simon Schuster <schuster.simon@siemens-energy.com>,
"James E . J . Bottomley"
<James.Bottomley@hansenpartnership.com>,
Helge Deller <deller@gmx.de>,
Jarkko Sakkinen <jarkko@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Ian Abbott <abbotti@mev.co.uk>,
H Hartley Sweeten <hsweeten@visionengravers.com>,
Lucas Stach <l.stach@pengutronix.de>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Patrik Jakobsson <patrik.r.jakobsson@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
Thierry Reding <thierry.reding@kernel.org>,
Mikko Perttunen <mperttunen@nvidia.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Christian Koenig <christian.koenig@amd.com>,
Huang Rui <ray.huang@amd.com>, Ankit Agrawal <ankita@nvidia.com>,
Alex Williamson <alex@shazbot.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
Dan Williams <djbw@kernel.org>,
Muchun Song <muchun.song@linux.dev>,
Oscar Salvador <osalvador@suse.de>,
David Hildenbrand <david@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
"Liam R . Howlett" <liam@infradead.org>,
Matthew Wilcox <willy@infradead.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Oleg Nesterov <oleg@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
SeongJae Park <sj@kernel.org>, Miaohe Lin <linmiaohe@huawei.com>,
Hugh Dickins <hughd@google.com>, Mike Rapoport <rppt@kernel.org>,
Kees Cook <kees@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-parisc@vger.kernel.org, linux-sgx@vger.kernel.org,
etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
linux-tegra@vger.kernel.org, kvm@vger.kernel.org,
linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev,
linux-mm@kvack.org, iommu@lists.linux.dev,
linux-perf-users@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
damon@lists.linux.dev, Rik van Riel <riel@surriel.com>,
Harry Yoo <harry@kernel.org>, Jann Horn <jannh@google.com>
Subject: Re: [PATCH 27/30] mm/vma: correct incorrect vma.h inclusion
Date: Tue, 7 Jul 2026 11:41:00 +0100 [thread overview]
Message-ID: <akzWq08xwXKqwwtq@lucifer> (raw)
In-Reply-To: <akZNiN5Y9fPk8bZH@pedro-suse.lan>
On Thu, Jul 02, 2026 at 12:40:30PM +0100, Pedro Falcato wrote:
> On Mon, Jun 29, 2026 at 01:23:38PM +0100, Lorenzo Stoakes wrote:
> > The only files which should be including vma.h are the implementation files
> > for the core VMA logic - vma.c, vma_init.c, and vma_exec.c.
> >
> > This is in order to allow for userland testing of core VMA logic. In this
> > cases, vma_internal.h and vma.h are included, providing both the
> > dependencies upon which the core VMA logic requires and its declarations.
> >
> > Userland testable VMA logic is achieved by having separate vma_internal.h
> > implementations for userland and kernel.
> >
> > Callers other than the core VMA implementation should include internal.h
> > instead. This header does not need to include vma_internal.h as it only
> > contains the vma.h declarations, for which the includes already present
> > suffice.
> >
> > Update code to reflect this, update comments to reflect the fact there are
> > 3 VMA implementation files and document things more clearly.
> >
> > While we're here, slightly improve the language of the comment describing
> > vma_exec.c.
>
> Two random thoughts:
> 1) perhaps vma.h -> vma_private.h
Not a bad idea thanks!
> 2) https://lore.kernel.org/all/CAHk-=wghMm2c+AYEcwYY7drSVXB27DYqc-ZXpFiq=XFs-w59wA@mail.gmail.com/
> mm/vma/whatever.c :) would PROBABLY solve the issue of people snooping vma.h
I think a vma/ subdir would probably confuse things further, I think renaming to
vma_private.h neatly solves it actually, along with a comment maybe in the
header itself?
Then again mm/vma/{vma.c,init.c, exec.c, private.h} isn't too crazy
either. Though vma.h is the actual 'shared' bit, and vma_internal.h is the
private bit that the userland changes. But could switch things around vma.h ->
mm/vma/internal.h that mm/internal.h imports, and mm/vma_internal.h becomes
mm/vma/private.h.
I think that could work but definitely a follow-up!
>
> >
> > No functional change intended.
> >
> > Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
>
> Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Thanks!
Cheers, Lorenzo
next prev parent reply other threads:[~2026-07-07 10:41 UTC|newest]
Thread overview: 99+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 12:23 [PATCH 00/30] mm: make VMA page offset handling more consistent Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 01/30] mm: move vma_start_pgoff() into mm.h and clean up Lorenzo Stoakes
2026-06-29 15:27 ` Gregory Price
2026-06-30 16:10 ` Pedro Falcato
2026-07-01 9:42 ` Lorenzo Stoakes
2026-07-03 13:36 ` Vlastimil Babka
2026-06-29 12:23 ` [PATCH 02/30] mm: add kdoc comments for vma_start/last_pgoff() Lorenzo Stoakes
2026-06-29 15:31 ` Gregory Price
2026-06-30 16:11 ` Pedro Falcato
2026-07-03 14:19 ` Vlastimil Babka
2026-06-29 12:23 ` [PATCH 03/30] tools/testing/vma: use vma_start_pgoff() in merge tests Lorenzo Stoakes
2026-06-29 15:40 ` Gregory Price
2026-06-29 16:35 ` Lorenzo Stoakes
2026-06-30 16:12 ` Pedro Falcato
2026-07-03 14:34 ` Vlastimil Babka
2026-06-29 12:23 ` [PATCH 04/30] mm: introduce and use vma_end_pgoff() Lorenzo Stoakes
2026-06-29 15:54 ` Gregory Price
2026-06-30 16:13 ` Pedro Falcato
2026-07-03 14:38 ` Vlastimil Babka
2026-06-29 12:23 ` [PATCH 05/30] mm/rmap: update mm/interval_tree.c comments Lorenzo Stoakes
2026-06-29 16:01 ` Gregory Price
2026-06-29 16:41 ` Lorenzo Stoakes
2026-06-29 17:11 ` Gregory Price
2026-06-29 17:40 ` Lorenzo Stoakes
2026-06-30 16:16 ` Pedro Falcato
2026-07-01 9:55 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 06/30] mm/rmap: parameterise vma_interval_tree_*() by address_space Lorenzo Stoakes
2026-06-30 16:19 ` Pedro Falcato
2026-07-01 9:56 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 07/30] mm/rmap: elide unnecessary static inline's in interval_tree.c Lorenzo Stoakes
2026-06-30 15:30 ` Gregory Price
2026-06-30 16:22 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 08/30] mm/rmap: rename vma_interval_tree_*() to mapping_interval_tree_*() Lorenzo Stoakes
2026-06-30 15:42 ` Gregory Price
2026-06-30 16:28 ` Pedro Falcato
2026-07-01 10:14 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 09/30] mm/rmap: parameterise anon_vma_interval_tree_*() by anon_vma Lorenzo Stoakes
2026-06-30 15:46 ` Gregory Price
2026-06-30 15:49 ` Lorenzo Stoakes
2026-06-30 15:55 ` Gregory Price
2026-06-30 15:59 ` Lorenzo Stoakes
2026-06-30 16:32 ` Pedro Falcato
2026-07-01 10:18 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 10/30] MAINTAINERS: Move mm/interval_tree.c to rmap section Lorenzo Stoakes
2026-06-30 16:33 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 11/30] mm/vma: introduce and use vmg_pages(), vmg_[start, end]_pgoff() Lorenzo Stoakes
2026-06-30 16:35 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 12/30] mm/vma: clean up anon_vma_compatible() Lorenzo Stoakes
2026-06-30 16:36 ` Pedro Falcato
2026-07-01 10:20 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 13/30] mm/vma: refactor vmg_adjust_set_range() for clarity Lorenzo Stoakes
2026-07-02 10:37 ` Pedro Falcato
2026-07-02 10:50 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 14/30] mm/vma: minor cleanup of expand_[upwards, downwards]() Lorenzo Stoakes
2026-07-02 10:41 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 15/30] mm: introduce and use linear_page_delta() Lorenzo Stoakes
2026-07-02 10:42 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 16/30] mm/vma: use vma_start_pgoff(), linear_page_index() in mm code Lorenzo Stoakes
2026-06-30 0:11 ` SJ Park
2026-07-02 10:47 ` Pedro Falcato
2026-07-02 10:49 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 17/30] mm: prefer vma_[start,end]_pgoff() to vma->vm_pgoff in kernel/ Lorenzo Stoakes
2026-07-02 11:01 ` Pedro Falcato
2026-07-02 11:30 ` Lorenzo Stoakes
2026-07-07 10:20 ` Marek Szyprowski
2026-06-29 12:23 ` [PATCH 18/30] mm/vma: remove duplicative vma_pgoff_offset() helper Lorenzo Stoakes
2026-07-02 11:02 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 19/30] mm: use linear_page_[index, delta]() consistently Lorenzo Stoakes
2026-06-29 13:56 ` Thomas Zimmermann
2026-06-29 14:56 ` Lorenzo Stoakes
2026-07-02 11:04 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 20/30] mm/vma: introduce vma_assert_can_modify() Lorenzo Stoakes
2026-07-02 11:16 ` Pedro Falcato
2026-07-02 12:16 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 21/30] mm/vma: add and use vma_[add/sub]_pgoff() Lorenzo Stoakes
2026-07-02 11:20 ` Pedro Falcato
2026-07-07 10:22 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 22/30] mm/vma: move __install_special_mapping() to vma.c Lorenzo Stoakes
2026-07-02 11:22 ` Pedro Falcato
2026-07-07 10:31 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 23/30] mm/vma: make vma_set_range() static, drop insert_vm_struct() decl Lorenzo Stoakes
2026-07-02 11:25 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 24/30] mm/vma: update vma_shrink() to not pass unnecessary pgoff parameter Lorenzo Stoakes
2026-07-02 11:27 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 25/30] mm/vma: update vmg_adjust_set_range() to offset pgoff instead Lorenzo Stoakes
2026-07-02 11:29 ` Pedro Falcato
2026-07-07 10:35 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 26/30] mm/vma: introduce and use vma_set_pgoff() Lorenzo Stoakes
2026-07-02 11:34 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 27/30] mm/vma: correct incorrect vma.h inclusion Lorenzo Stoakes
2026-07-02 11:40 ` Pedro Falcato
2026-07-07 10:41 ` Lorenzo Stoakes [this message]
2026-06-29 12:23 ` [PATCH 28/30] mm/vma: use guard clauses in can_vma_merge_[before, after]() Lorenzo Stoakes
2026-07-02 11:41 ` Pedro Falcato
2026-06-29 12:23 ` [PATCH 29/30] tools/testing/vma: default VMA flag bits to 64-bit Lorenzo Stoakes
2026-07-02 11:44 ` Pedro Falcato
2026-07-07 10:47 ` Lorenzo Stoakes
2026-06-29 12:23 ` [PATCH 30/30] tools/testing/vma: output compared expression on ASSERT_[EQ, NE]() Lorenzo Stoakes
2026-07-02 11:53 ` Pedro Falcato
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=akzWq08xwXKqwwtq@lucifer \
--to=ljs@kernel.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=abbotti@mev.co.uk \
--cc=acme@kernel.org \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alex@shazbot.org \
--cc=ankita@nvidia.com \
--cc=bp@alien8.de \
--cc=brauner@kernel.org \
--cc=christian.koenig@amd.com \
--cc=damon@lists.linux.dev \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=deller@gmx.de \
--cc=dinguyen@kernel.org \
--cc=djbw@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=harry@kernel.org \
--cc=hsweeten@visionengravers.com \
--cc=hughd@google.com \
--cc=iommu@lists.linux.dev \
--cc=jannh@google.com \
--cc=jarkko@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=kasan-dev@googlegroups.com \
--cc=kees@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=l.stach@pengutronix.de \
--cc=liam@infradead.org \
--cc=linmiaohe@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lumag@kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=mperttunen@nvidia.com \
--cc=mripard@kernel.org \
--cc=muchun.song@linux.dev \
--cc=namhyung@kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=oleg@redhat.com \
--cc=osalvador@suse.de \
--cc=patrik.r.jakobsson@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=pfalcato@suse.de \
--cc=ray.huang@amd.com \
--cc=riel@surriel.com \
--cc=robin.clark@oss.qualcomm.com \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=schuster.simon@siemens-energy.com \
--cc=simona@ffwll.ch \
--cc=sj@kernel.org \
--cc=surenb@google.com \
--cc=tglx@kernel.org \
--cc=thierry.reding@kernel.org \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
--cc=x86@kernel.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