summaryrefslogtreecommitdiff
path: root/mm/vma_exec.c
diff options
context:
space:
mode:
authorLorenzo Stoakes <ljs@kernel.org>2026-07-10 21:17:11 +0100
committerAndrew Morton <akpm@linux-foundation.org>2026-08-04 19:19:04 -0700
commitdd7d7d00c073b742922ae1a82c7bd2f3a27b4140 (patch)
tree85c0ee00291cc03dc7d71391478820f6c1184e09 /mm/vma_exec.c
parent613562c29fa69840f9a6239f1c3e0c24270a795d (diff)
downloadlinux-next-dd7d7d00c073b742922ae1a82c7bd2f3a27b4140.tar.gz
linux-next-dd7d7d00c073b742922ae1a82c7bd2f3a27b4140.zip
mm/vma: correct incorrect vma.h inclusion
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. No functional change intended. Link: https://lore.kernel.org/20260710-b4-pre-scalable-cow-v2-30-2a5aa403d977@kernel.org Signed-off-by: Lorenzo Stoakes <ljs@kernel.org> Reviewed-by: Pedro Falcato <pfalcato@suse.de> Reviewed-by: Gregory Price <gourry@gourry.net> Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Cc: Ackerley Tng <ackerleytng@google.com> Cc: David Hildenbrand (Arm) <david@kernel.org> Cc: Kai Huang <kai.huang@intel.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: SJ Park <sj@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Liam R. Howlett (Oracle) <liam@infradead.org> Cc: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/vma_exec.c')
-rw-r--r--mm/vma_exec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/vma_exec.c b/mm/vma_exec.c
index 13a05e041195..ef1fa2b161f3 100644
--- a/mm/vma_exec.c
+++ b/mm/vma_exec.c
@@ -1,10 +1,14 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * Functions explicitly implemented for exec functionality which however are
- * explicitly VMA-only logic.
+ * Functions provided for exec functionality which however are
+ * specifically VMA-only logic.
*/
+/*
+ * To allow for userland testing we place internal dependencies in
+ * vma_internal.h and external VMA API declarations in vma.h.
+ */
#include "vma_internal.h"
#include "vma.h"