From: Lorenzo Stoakes <ljs@kernel.org>
To: Gregory Price <gourry@gourry.net>
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, Pedro Falcato <pfalcato@suse.de>,
Rik van Riel <riel@surriel.com>, Harry Yoo <harry@kernel.org>,
Jann Horn <jannh@google.com>
Subject: Re: [PATCH 16/30] mm/vma: use vma_start_pgoff(), linear_page_index() in mm code
Date: Fri, 10 Jul 2026 15:52:40 +0100 [thread overview]
Message-ID: <alEHAF8gEh_sFU_r@lucifer> (raw)
In-Reply-To: <ak--doS80hnAeQ9s@gourry-fedora-PF4VCD3F>
On Thu, Jul 09, 2026 at 11:29:58AM -0400, Gregory Price wrote:
> On Mon, Jun 29, 2026 at 01:23:27PM +0100, Lorenzo Stoakes wrote:
> > There are many instances in which linear_page_index() (as well as
> > linear_page_delta()) is open-coded, which is confusing and inconsistent.
> >
> > Additionally, vma->vm_pgoff doesn't necessarily make it clear that this is
> > the page offset of the start of the VMA range.
> >
> > Doing so also aids greppability.
> >
> > So use vma_start_pgoff() in favour of directly accessing vma->vm_pgoff, and
> > linear_page_index() where we can.
> >
> > This also lays the ground for future changes which will add an anonymous
> > page offset in order to be able to index MAP_PRIVATE-file backed anon
> > folios in terms of their virtual page offset.
> >
> > No functional change intended.
> >
> > Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
>
> such a nice readability improvement, thank you.
>
> This made me wonder though whether we can make it painful for people to
> open-code this in the future, otherwise I fear another one of these
> patches creeping in 5-10 years down the line.
Yeah for sure, I wonder if we could somehow make some VMA fields private
honestly which would address a lot of this. I think there clever ways of making
certain things a gap in the struct outwardly that can do it.
But one for the future :)
>
> Not sure it's feasible though
>
> Reviewed-by: Gregory Price <gourry@gourry.net>
Thanks! :)
Cheers, Lorenzo
>
> > ---
> > include/linux/huge_mm.h | 1 +
> > include/linux/hugetlb.h | 3 +--
> > include/linux/pagemap.h | 2 +-
> > mm/damon/vaddr.c | 5 +++--
> > mm/debug.c | 2 +-
> > mm/filemap.c | 7 ++++---
> > mm/huge_memory.c | 2 +-
> > mm/hugetlb.c | 11 ++++-------
> > mm/internal.h | 24 ++++++++++++++----------
> > mm/khugepaged.c | 3 ++-
> > mm/madvise.c | 6 +++---
> > mm/mapping_dirty_helpers.c | 2 +-
> > mm/memory.c | 25 +++++++++++++------------
> > mm/mempolicy.c | 13 +++++++------
> > mm/mremap.c | 12 ++++--------
> > mm/msync.c | 4 ++--
> > mm/nommu.c | 7 ++++---
> > mm/pagewalk.c | 2 +-
> > mm/shmem.c | 9 +++++----
> > mm/userfaultfd.c | 4 ++--
> > mm/util.c | 4 ++--
> > mm/vma.c | 15 +++++++--------
> > mm/vma_exec.c | 4 ++--
> > mm/vma_init.c | 2 +-
> > 24 files changed, 86 insertions(+), 83 deletions(-)
> >
> > diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
> > index ad20f7f8c179..653b81d08fe7 100644
> > --- a/include/linux/huge_mm.h
> > +++ b/include/linux/huge_mm.h
> > @@ -230,6 +230,7 @@ static inline bool thp_vma_suitable_order(struct vm_area_struct *vma,
> >
> > /* Don't have to check pgoff for anonymous vma */
> > if (!vma_is_anonymous(vma)) {
> > + /* vma_start_pgoff() in mm.h so not available. */
> > if (!IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) - vma->vm_pgoff,
> > hpage_size >> PAGE_SHIFT))
> > return false;
> > diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> > index 2abaf99321e9..8390f50604d6 100644
> > --- a/include/linux/hugetlb.h
> > +++ b/include/linux/hugetlb.h
> > @@ -792,8 +792,7 @@ static inline pgoff_t hugetlb_linear_page_index(struct vm_area_struct *vma,
> > {
> > struct hstate *h = hstate_vma(vma);
> >
> > - return ((address - vma->vm_start) >> huge_page_shift(h)) +
> > - (vma->vm_pgoff >> huge_page_order(h));
> > + return linear_page_index(vma, address) >> huge_page_order(h);
> > }
> >
> > static inline bool order_is_gigantic(unsigned int order)
> > diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> > index 644c0f25ae73..68a88d34a468 100644
> > --- a/include/linux/pagemap.h
> > +++ b/include/linux/pagemap.h
> > @@ -1101,7 +1101,7 @@ static inline pgoff_t linear_page_index(const struct vm_area_struct *vma,
> > pgoff_t pgoff;
> >
> > pgoff = linear_page_delta(vma, address);
> > - pgoff += vma->vm_pgoff;
> > + pgoff += vma_start_pgoff(vma);
> > return pgoff;
> > }
> >
> > diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
> > index d27147603564..faa44aa3219b 100644
> > --- a/mm/damon/vaddr.c
> > +++ b/mm/damon/vaddr.c
> > @@ -12,6 +12,7 @@
> > #include <linux/mman.h>
> > #include <linux/mmu_notifier.h>
> > #include <linux/page_idle.h>
> > +#include <linux/pagemap.h>
> > #include <linux/pagewalk.h>
> > #include <linux/sched/mm.h>
> >
> > @@ -627,8 +628,8 @@ static void damos_va_migrate_dests_add(struct folio *folio,
> > }
> >
> > order = folio_order(folio);
> > - ilx = vma->vm_pgoff >> order;
> > - ilx += (addr - vma->vm_start) >> (PAGE_SHIFT + order);
> > + ilx = vma_start_pgoff(vma) >> order;
> > + ilx += linear_page_delta(vma, addr) >> order;
> >
> > for (i = 0; i < dests->nr_dests; i++)
> > weight_total += dests->weight_arr[i];
> > diff --git a/mm/debug.c b/mm/debug.c
> > index 77fa8fe1d641..497654b36f1a 100644
> > --- a/mm/debug.c
> > +++ b/mm/debug.c
> > @@ -163,7 +163,7 @@ void dump_vma(const struct vm_area_struct *vma)
> > "flags: %#lx(%pGv)\n",
> > vma, (void *)vma->vm_start, (void *)vma->vm_end, vma->vm_mm,
> > (unsigned long)pgprot_val(vma->vm_page_prot),
> > - vma->anon_vma, vma->vm_ops, vma->vm_pgoff,
> > + vma->anon_vma, vma->vm_ops, vma_start_pgoff(vma),
> > vma->vm_file, vma->vm_private_data,
> > #ifdef CONFIG_PER_VMA_LOCK
> > refcount_read(&vma->vm_refcnt),
> > diff --git a/mm/filemap.c b/mm/filemap.c
> > index 5af62e6abca5..bcb07b21a685 100644
> > --- a/mm/filemap.c
> > +++ b/mm/filemap.c
> > @@ -3402,8 +3402,8 @@ static struct file *do_sync_mmap_readahead(struct vm_fault *vmf)
> > * of memory.
> > */
> > struct vm_area_struct *vma = vmf->vma;
> > - unsigned long start = vma->vm_pgoff;
> > - unsigned long end = start + vma_pages(vma);
> > + const unsigned long start = vma_start_pgoff(vma);
> > + const unsigned long end = vma_end_pgoff(vma);
> > unsigned long ra_end;
> >
> > ra->order = exec_folio_order();
> > @@ -3921,7 +3921,8 @@ vm_fault_t filemap_map_pages(struct vm_fault *vmf,
> > goto out;
> > }
> >
> > - addr = vma->vm_start + ((start_pgoff - vma->vm_pgoff) << PAGE_SHIFT);
> > + addr = vma->vm_start +
> > + ((start_pgoff - vma_start_pgoff(vma)) << PAGE_SHIFT);
> > vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, addr, &vmf->ptl);
> > if (!vmf->pte) {
> > folio_unlock(folio);
> > diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> > index 2bccb0a53a0a..e94f56487225 100644
> > --- a/mm/huge_memory.c
> > +++ b/mm/huge_memory.c
> > @@ -180,7 +180,7 @@ unsigned long __thp_vma_allowable_orders(struct vm_area_struct *vma,
> > */
> > if (!in_pf && shmem_file(vma->vm_file))
> > return orders & shmem_allowable_huge_orders(file_inode(vma->vm_file),
> > - vma, vma->vm_pgoff, 0,
> > + vma, vma_start_pgoff(vma), 0,
> > forced_collapse);
> >
> > if (!vma_is_anonymous(vma)) {
> > diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> > index f45000149a78..d44a3ac5ee0a 100644
> > --- a/mm/hugetlb.c
> > +++ b/mm/hugetlb.c
> > @@ -1011,8 +1011,7 @@ static long region_count(struct resv_map *resv, long f, long t)
> > static pgoff_t vma_hugecache_offset(struct hstate *h,
> > struct vm_area_struct *vma, unsigned long address)
> > {
> > - return ((address - vma->vm_start) >> huge_page_shift(h)) +
> > - (vma->vm_pgoff >> huge_page_order(h));
> > + return linear_page_index(vma, address) >> huge_page_order(h);
> > }
> >
> > /*
> > @@ -5372,8 +5371,7 @@ static void unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
> > * from page cache lookup which is in HPAGE_SIZE units.
> > */
> > address = address & huge_page_mask(h);
> > - pgoff = ((address - vma->vm_start) >> PAGE_SHIFT) +
> > - vma->vm_pgoff;
> > + pgoff = linear_page_index(vma, address);
> > mapping = vma->vm_file->f_mapping;
> >
> > /*
> > @@ -6771,7 +6769,7 @@ static unsigned long page_table_shareable(struct vm_area_struct *svma,
> > struct vm_area_struct *vma,
> > unsigned long addr, pgoff_t idx)
> > {
> > - unsigned long saddr = ((idx - svma->vm_pgoff) << PAGE_SHIFT) +
> > + unsigned long saddr = ((idx - vma_start_pgoff(svma)) << PAGE_SHIFT) +
> > svma->vm_start;
> > unsigned long sbase = saddr & PUD_MASK;
> > unsigned long s_end = sbase + PUD_SIZE;
> > @@ -6856,8 +6854,7 @@ pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct *vma,
> > unsigned long addr, pud_t *pud)
> > {
> > struct address_space *mapping = vma->vm_file->f_mapping;
> > - pgoff_t idx = ((addr - vma->vm_start) >> PAGE_SHIFT) +
> > - vma->vm_pgoff;
> > + const pgoff_t idx = linear_page_index(vma, addr);
> > struct vm_area_struct *svma;
> > unsigned long saddr;
> > pte_t *spte = NULL;
> > diff --git a/mm/internal.h b/mm/internal.h
> > index 181e79f1d6a2..89e5b7efe256 100644
> > --- a/mm/internal.h
> > +++ b/mm/internal.h
> > @@ -1143,26 +1143,28 @@ static inline bool
> > folio_within_range(struct folio *folio, struct vm_area_struct *vma,
> > unsigned long start, unsigned long end)
> > {
> > - pgoff_t pgoff, addr;
> > - unsigned long vma_pglen = vma_pages(vma);
> > + const unsigned long vma_pglen = vma_pages(vma);
> > + pgoff_t pgoff_folio, pgoff_vma_start;
> > + unsigned long addr;
> >
> > VM_WARN_ON_FOLIO(folio_test_ksm(folio), folio);
> > if (start > end)
> > return false;
> >
> > + pgoff_folio = folio_pgoff(folio);
> > + pgoff_vma_start = vma_start_pgoff(vma);
> > +
> > if (start < vma->vm_start)
> > start = vma->vm_start;
> >
> > if (end > vma->vm_end)
> > end = vma->vm_end;
> >
> > - pgoff = folio_pgoff(folio);
> > -
> > /* if folio start address is not in vma range */
> > - if (!in_range(pgoff, vma->vm_pgoff, vma_pglen))
> > + if (!in_range(pgoff_folio, pgoff_vma_start, vma_pglen))
> > return false;
> >
> > - addr = vma->vm_start + ((pgoff - vma->vm_pgoff) << PAGE_SHIFT);
> > + addr = vma->vm_start + ((pgoff_folio - pgoff_vma_start) << PAGE_SHIFT);
> >
> > return !(addr < start || end - addr < folio_size(folio));
> > }
> > @@ -1234,15 +1236,16 @@ extern pmd_t maybe_pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma);
> > static inline unsigned long vma_address(const struct vm_area_struct *vma,
> > pgoff_t pgoff, unsigned long nr_pages)
> > {
> > + const pgoff_t pgoff_start = vma_start_pgoff(vma);
> > unsigned long address;
> >
> > - if (pgoff >= vma->vm_pgoff) {
> > + if (pgoff >= pgoff_start) {
> > address = vma->vm_start +
> > - ((pgoff - vma->vm_pgoff) << PAGE_SHIFT);
> > + ((pgoff - pgoff_start) << PAGE_SHIFT);
> > /* Check for address beyond vma (or wrapped through 0?) */
> > if (address < vma->vm_start || address >= vma->vm_end)
> > address = -EFAULT;
> > - } else if (pgoff + nr_pages - 1 >= vma->vm_pgoff) {
> > + } else if (pgoff + nr_pages - 1 >= pgoff_start) {
> > /* Test above avoids possibility of wrap to 0 on 32-bit */
> > address = vma->vm_start;
> > } else {
> > @@ -1266,7 +1269,8 @@ static inline unsigned long vma_address_end(struct page_vma_mapped_walk *pvmw)
> > return pvmw->address + PAGE_SIZE;
> >
> > pgoff = pvmw->pgoff + pvmw->nr_pages;
> > - address = vma->vm_start + ((pgoff - vma->vm_pgoff) << PAGE_SHIFT);
> > + address = vma->vm_start +
> > + ((pgoff - vma_start_pgoff(vma)) << PAGE_SHIFT);
> > /* Check for address beyond vma (or wrapped through 0?) */
> > if (address < vma->vm_start || address > vma->vm_end)
> > address = vma->vm_end;
> > diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> > index bd5f86cf4bd8..ffef738d826c 100644
> > --- a/mm/khugepaged.c
> > +++ b/mm/khugepaged.c
> > @@ -2145,7 +2145,8 @@ static void retract_page_tables(struct address_space *mapping, pgoff_t pgoff)
> > spinlock_t *ptl;
> > bool success = false;
> >
> > - addr = vma->vm_start + ((pgoff - vma->vm_pgoff) << PAGE_SHIFT);
> > + addr = vma->vm_start +
> > + ((pgoff - vma_start_pgoff(vma)) << PAGE_SHIFT);
> > if (addr & ~HPAGE_PMD_MASK ||
> > vma->vm_end < addr + HPAGE_PMD_SIZE)
> > continue;
> > diff --git a/mm/madvise.c b/mm/madvise.c
> > index cd9bb077072c..6730c4200a93 100644
> > --- a/mm/madvise.c
> > +++ b/mm/madvise.c
> > @@ -253,7 +253,7 @@ static void shmem_swapin_range(struct vm_area_struct *vma,
> > continue;
> >
> > addr = vma->vm_start +
> > - ((xas.xa_index - vma->vm_pgoff) << PAGE_SHIFT);
> > + ((xas.xa_index - vma_start_pgoff(vma)) << PAGE_SHIFT);
> > xas_pause(&xas);
> > rcu_read_unlock();
> >
> > @@ -318,7 +318,7 @@ static long madvise_willneed(struct madvise_behavior *madv_behavior)
> > mark_mmap_lock_dropped(madv_behavior);
> > get_file(file);
> > offset = (loff_t)(start - vma->vm_start)
> > - + ((loff_t)vma->vm_pgoff << PAGE_SHIFT);
> > + + ((loff_t)vma_start_pgoff(vma) << PAGE_SHIFT);
> > mmap_read_unlock(mm);
> > vfs_fadvise(file, offset, end - start, POSIX_FADV_WILLNEED);
> > fput(file);
> > @@ -1023,7 +1023,7 @@ static long madvise_remove(struct madvise_behavior *madv_behavior)
> > return -EACCES;
> >
> > offset = (loff_t)(start - vma->vm_start)
> > - + ((loff_t)vma->vm_pgoff << PAGE_SHIFT);
> > + + ((loff_t)vma_start_pgoff(vma) << PAGE_SHIFT);
> >
> > /*
> > * Filesystem's fallocate may need to take i_rwsem. We need to
> > diff --git a/mm/mapping_dirty_helpers.c b/mm/mapping_dirty_helpers.c
> > index 737c407f4081..e0efa36e0a07 100644
> > --- a/mm/mapping_dirty_helpers.c
> > +++ b/mm/mapping_dirty_helpers.c
> > @@ -95,7 +95,7 @@ static int clean_record_pte(pte_t *pte, unsigned long addr,
> >
> > if (pte_dirty(ptent)) {
> > pgoff_t pgoff = ((addr - walk->vma->vm_start) >> PAGE_SHIFT) +
> > - walk->vma->vm_pgoff - cwalk->bitmap_pgoff;
> > + vma_start_pgoff(walk->vma) - cwalk->bitmap_pgoff;
> > pte_t old_pte = ptep_modify_prot_start(walk->vma, addr, pte);
> >
> > ptent = pte_mkclean(old_pte);
> > diff --git a/mm/memory.c b/mm/memory.c
> > index 98c1a245f45a..f5eb06544ba4 100644
> > --- a/mm/memory.c
> > +++ b/mm/memory.c
> > @@ -725,10 +725,10 @@ static inline struct page *__vm_normal_page(struct vm_area_struct *vma,
> > if (!pfn_valid(pfn))
> > return NULL;
> > } else {
> > - unsigned long off = (addr - vma->vm_start) >> PAGE_SHIFT;
> > + const pgoff_t index = linear_page_index(vma, addr);
> >
> > /* Only CoW'ed anon folios are "normal". */
> > - if (pfn == vma->vm_pgoff + off)
> > + if (pfn == index)
> > return NULL;
> > if (!is_cow_mapping(vma->vm_flags))
> > return NULL;
> > @@ -2643,7 +2643,7 @@ static int __vm_map_pages(struct vm_area_struct *vma, struct page **pages,
> > int vm_map_pages(struct vm_area_struct *vma, struct page **pages,
> > unsigned long num)
> > {
> > - return __vm_map_pages(vma, pages, num, vma->vm_pgoff);
> > + return __vm_map_pages(vma, pages, num, vma_start_pgoff(vma));
> > }
> > EXPORT_SYMBOL(vm_map_pages);
> >
> > @@ -3298,7 +3298,8 @@ int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long
> > unsigned long pfn;
> > int err;
> >
> > - err = __simple_ioremap_prep(vm_len, vma->vm_pgoff, start, len, &pfn);
> > + err = __simple_ioremap_prep(vm_len, vma_start_pgoff(vma), start, len,
> > + &pfn);
> > if (err)
> > return err;
> >
> > @@ -4342,15 +4343,15 @@ static inline void unmap_mapping_range_tree(struct address_space *mapping,
> > struct zap_details *details)
> > {
> > struct vm_area_struct *vma;
> > - unsigned long start, size;
> > struct mmu_gather tlb;
> >
> > mapping_interval_tree_foreach(vma, mapping, first_index, last_index) {
> > - const pgoff_t start_idx = max(first_index, vma->vm_pgoff);
> > + const pgoff_t start_idx = max(first_index, vma_start_pgoff(vma));
> > const pgoff_t end_idx = min(last_index, vma_last_pgoff(vma)) + 1;
> > -
> > - start = vma->vm_start + ((start_idx - vma->vm_pgoff) << PAGE_SHIFT);
> > - size = (end_idx - start_idx) << PAGE_SHIFT;
> > + const pgoff_t offset = start_idx - vma_start_pgoff(vma);
> > + const unsigned long offset_bytes = offset << PAGE_SHIFT;
> > + const unsigned long start = vma->vm_start + offset_bytes;
> > + const unsigned long size = (end_idx - start_idx) << PAGE_SHIFT;
> >
> > tlb_gather_mmu(&tlb, vma->vm_mm);
> > zap_vma_range_batched(&tlb, vma, start, size, details);
> > @@ -5684,7 +5685,7 @@ vm_fault_t finish_fault(struct vm_fault *vmf)
> > } else if (nr_pages > 1) {
> > pgoff_t idx = folio_page_idx(folio, page);
> > /* The page offset of vmf->address within the VMA. */
> > - pgoff_t vma_off = vmf->pgoff - vmf->vma->vm_pgoff;
> > + pgoff_t vma_off = vmf->pgoff - vma_start_pgoff(vmf->vma);
> > /* The index of the entry in the pagetable for fault page. */
> > pgoff_t pte_off = pte_index(vmf->address);
> >
> > @@ -5796,7 +5797,7 @@ static vm_fault_t do_fault_around(struct vm_fault *vmf)
> > pgoff_t nr_pages = READ_ONCE(fault_around_pages);
> > pgoff_t pte_off = pte_index(vmf->address);
> > /* The page offset of vmf->address within the VMA. */
> > - pgoff_t vma_off = vmf->pgoff - vmf->vma->vm_pgoff;
> > + pgoff_t vma_off = vmf->pgoff - vma_start_pgoff(vmf->vma);
> > pgoff_t from_pte, to_pte;
> > vm_fault_t ret;
> >
> > @@ -7274,7 +7275,7 @@ void print_vma_addr(char *prefix, unsigned long ip)
> > if (vma && vma->vm_file) {
> > struct file *f = vma->vm_file;
> > ip -= vma->vm_start;
> > - ip += vma->vm_pgoff << PAGE_SHIFT;
> > + ip += vma_start_pgoff(vma) << PAGE_SHIFT;
> > printk("%s%pD[%lx,%lx+%lx]", prefix, f, ip,
> > vma->vm_start,
> > vma->vm_end - vma->vm_start);
> > diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> > index 36699fabd3c2..650cdb23354a 100644
> > --- a/mm/mempolicy.c
> > +++ b/mm/mempolicy.c
> > @@ -2048,8 +2048,8 @@ struct mempolicy *get_vma_policy(struct vm_area_struct *vma,
> > pol = get_task_policy(current);
> > if (pol->mode == MPOL_INTERLEAVE ||
> > pol->mode == MPOL_WEIGHTED_INTERLEAVE) {
> > - *ilx += vma->vm_pgoff >> order;
> > - *ilx += (addr - vma->vm_start) >> (PAGE_SHIFT + order);
> > + *ilx += vma_start_pgoff(vma) >> order;
> > + *ilx += linear_page_delta(vma, addr) >> order;
> > }
> > return pol;
> > }
> > @@ -3250,16 +3250,17 @@ EXPORT_SYMBOL_FOR_MODULES(mpol_shared_policy_init, "kvm");
> > int mpol_set_shared_policy(struct shared_policy *sp,
> > struct vm_area_struct *vma, struct mempolicy *pol)
> > {
> > - int err;
> > + const pgoff_t pgoff = vma_start_pgoff(vma);
> > + const pgoff_t pgoff_end = vma_end_pgoff(vma);
> > struct sp_node *new = NULL;
> > - unsigned long sz = vma_pages(vma);
> > + int err;
> >
> > if (pol) {
> > - new = sp_alloc(vma->vm_pgoff, vma->vm_pgoff + sz, pol);
> > + new = sp_alloc(pgoff, pgoff_end, pol);
> > if (!new)
> > return -ENOMEM;
> > }
> > - err = shared_policy_replace(sp, vma->vm_pgoff, vma->vm_pgoff + sz, new);
> > + err = shared_policy_replace(sp, pgoff, pgoff_end, new);
> > if (err && new)
> > sp_free(new);
> > return err;
> > diff --git a/mm/mremap.c b/mm/mremap.c
> > index e9c8b1d05832..079a0ba0c4a7 100644
> > --- a/mm/mremap.c
> > +++ b/mm/mremap.c
> > @@ -948,8 +948,7 @@ static unsigned long vrm_set_new_addr(struct vma_remap_struct *vrm)
> > struct vm_area_struct *vma = vrm->vma;
> > unsigned long map_flags = 0;
> > /* Page Offset _into_ the VMA. */
> > - pgoff_t internal_pgoff = (vrm->addr - vma->vm_start) >> PAGE_SHIFT;
> > - pgoff_t pgoff = vma->vm_pgoff + internal_pgoff;
> > + const pgoff_t pgoff = linear_page_index(vma, vrm->addr);
> > unsigned long new_addr = vrm_implies_new_addr(vrm) ? vrm->new_addr : 0;
> > unsigned long res;
> >
> > @@ -1255,12 +1254,10 @@ static void unmap_source_vma(struct vma_remap_struct *vrm)
> > static int copy_vma_and_data(struct vma_remap_struct *vrm,
> > struct vm_area_struct **new_vma_ptr)
> > {
> > - unsigned long internal_offset = vrm->addr - vrm->vma->vm_start;
> > - unsigned long internal_pgoff = internal_offset >> PAGE_SHIFT;
> > - unsigned long new_pgoff = vrm->vma->vm_pgoff + internal_pgoff;
> > - unsigned long moved_len;
> > + const unsigned long new_pgoff = linear_page_index(vrm->vma, vrm->addr);
> > struct vm_area_struct *vma = vrm->vma;
> > struct vm_area_struct *new_vma;
> > + unsigned long moved_len;
> > int err = 0;
> > PAGETABLE_MOVE(pmc, NULL, NULL, vrm->addr, vrm->new_addr, vrm->old_len);
> >
> > @@ -1802,8 +1799,7 @@ static int check_prep_vma(struct vma_remap_struct *vrm)
> > vrm->populate_expand = true;
> >
> > /* Need to be careful about a growing mapping */
> > - pgoff = (addr - vma->vm_start) >> PAGE_SHIFT;
> > - pgoff += vma->vm_pgoff;
> > + pgoff = linear_page_index(vma, addr);
> > if (pgoff + (new_len >> PAGE_SHIFT) < pgoff)
> > return -EINVAL;
> >
> > diff --git a/mm/msync.c b/mm/msync.c
> > index ac4c9bfea2e7..90b491a27a14 100644
> > --- a/mm/msync.c
> > +++ b/mm/msync.c
> > @@ -12,6 +12,7 @@
> > #include <linux/mm.h>
> > #include <linux/mman.h>
> > #include <linux/file.h>
> > +#include <linux/pagemap.h>
> > #include <linux/syscalls.h>
> > #include <linux/sched.h>
> >
> > @@ -85,8 +86,7 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
> > goto out_unlock;
> > }
> > file = vma->vm_file;
> > - fstart = (start - vma->vm_start) +
> > - ((loff_t)vma->vm_pgoff << PAGE_SHIFT);
> > + fstart = (loff_t)linear_page_index(vma, start) << PAGE_SHIFT;
> > fend = fstart + (min(end, vma->vm_end) - start) - 1;
> > start = vma->vm_end;
> > if ((flags & MS_SYNC) && file &&
> > diff --git a/mm/nommu.c b/mm/nommu.c
> > index 6d168f69763f..60560b2c457e 100644
> > --- a/mm/nommu.c
> > +++ b/mm/nommu.c
> > @@ -975,7 +975,7 @@ static int do_mmap_private(struct vm_area_struct *vma,
> > /* read the contents of a file into the copy */
> > loff_t fpos;
> >
> > - fpos = vma->vm_pgoff;
> > + fpos = vma_start_pgoff(vma);
> > fpos <<= PAGE_SHIFT;
> >
> > ret = kernel_read(vma->vm_file, base, len, &fpos);
> > @@ -1355,7 +1355,8 @@ static int split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma,
> > delete_nommu_region(vma->vm_region);
> > if (new_below) {
> > vma->vm_region->vm_start = vma->vm_start = addr;
> > - vma->vm_region->vm_pgoff = vma->vm_pgoff += npages;
> > + vma->vm_pgoff += npages;
> > + vma->vm_region->vm_pgoff = vma_start_pgoff(vma);
> > } else {
> > vma->vm_region->vm_end = vma->vm_end = addr;
> > vma->vm_region->vm_top = addr;
> > @@ -1603,7 +1604,7 @@ int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long
> > unsigned long pfn = start >> PAGE_SHIFT;
> > unsigned long vm_len = vma->vm_end - vma->vm_start;
> >
> > - pfn += vma->vm_pgoff;
> > + pfn += vma_start_pgoff(vma);
> > return io_remap_pfn_range(vma, vma->vm_start, pfn, vm_len, vma->vm_page_prot);
> > }
> > EXPORT_SYMBOL(vm_iomap_memory);
> > diff --git a/mm/pagewalk.c b/mm/pagewalk.c
> > index 98d090ede077..0a3bbff57d46 100644
> > --- a/mm/pagewalk.c
> > +++ b/mm/pagewalk.c
> > @@ -813,7 +813,7 @@ int walk_page_mapping(struct address_space *mapping, pgoff_t first_index,
> > mapping_interval_tree_foreach(vma, mapping, first_index,
> > first_index + nr - 1) {
> > /* Clip to the vma */
> > - vba = vma->vm_pgoff;
> > + vba = vma_start_pgoff(vma);
> > vea = vba + vma_pages(vma);
> > cba = first_index;
> > cba = max(cba, vba);
> > diff --git a/mm/shmem.c b/mm/shmem.c
> > index b51f83c970bb..4e7f6bc7a389 100644
> > --- a/mm/shmem.c
> > +++ b/mm/shmem.c
> > @@ -1032,6 +1032,8 @@ unsigned long shmem_swap_usage(struct vm_area_struct *vma)
> > struct inode *inode = file_inode(vma->vm_file);
> > struct shmem_inode_info *info = SHMEM_I(inode);
> > struct address_space *mapping = inode->i_mapping;
> > + const pgoff_t pgoff = vma_start_pgoff(vma);
> > + const pgoff_t pgoff_end = vma_end_pgoff(vma);
> > unsigned long swapped;
> >
> > /* Be careful as we don't hold info->lock */
> > @@ -1045,12 +1047,11 @@ unsigned long shmem_swap_usage(struct vm_area_struct *vma)
> > if (!swapped)
> > return 0;
> >
> > - if (!vma->vm_pgoff && vma->vm_end - vma->vm_start >= inode->i_size)
> > + if (!pgoff && vma->vm_end - vma->vm_start >= inode->i_size)
> > return swapped << PAGE_SHIFT;
> >
> > /* Here comes the more involved part */
> > - return shmem_partial_swap_usage(mapping, vma->vm_pgoff,
> > - vma->vm_pgoff + vma_pages(vma));
> > + return shmem_partial_swap_usage(mapping, pgoff, pgoff_end);
> > }
> >
> > /*
> > @@ -2839,7 +2840,7 @@ static struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
> > * by page order, as in shmem_get_pgoff_policy() and get_vma_policy()).
> > */
> > *ilx = inode->i_ino;
> > - index = ((addr - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
> > + index = linear_page_index(vma, addr);
> > return mpol_shared_policy_lookup(&SHMEM_I(inode)->policy, index);
> > }
> >
> > diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
> > index 246af12bf801..bf4518f4449d 100644
> > --- a/mm/userfaultfd.c
> > +++ b/mm/userfaultfd.c
> > @@ -481,7 +481,7 @@ static void mfill_retry_state_save(struct mfill_retry_state *s,
> > {
> > s->flags = vma_flags_and_mask(&vma->flags, MFILL_RETRY_STATE_VMA_FLAGS);
> > s->ops = vma_uffd_ops(vma);
> > - s->pgoff = vma->vm_pgoff;
> > + s->pgoff = vma_start_pgoff(vma);
> >
> > if (vma->vm_file)
> > s->file = get_file(vma->vm_file);
> > @@ -507,7 +507,7 @@ static bool mfill_retry_state_changed(struct mfill_retry_state *state,
> >
> > /* VMA was file backed, but file, inode or offset has changed */
> > if (!vma->vm_file || vma->vm_file->f_inode != state->file->f_inode ||
> > - state->file != vma->vm_file || vma->vm_pgoff != state->pgoff)
> > + state->file != vma->vm_file || vma_start_pgoff(vma) != state->pgoff)
> > return true;
> >
> > return false;
> > diff --git a/mm/util.c b/mm/util.c
> > index af2c2103f0d9..61e6d32b2c16 100644
> > --- a/mm/util.c
> > +++ b/mm/util.c
> > @@ -1188,7 +1188,7 @@ void compat_set_desc_from_vma(struct vm_area_desc *desc,
> > desc->start = vma->vm_start;
> > desc->end = vma->vm_end;
> >
> > - desc->pgoff = vma->vm_pgoff;
> > + desc->pgoff = vma_start_pgoff(vma);
> > desc->vm_file = vma->vm_file;
> > desc->vma_flags = vma->flags;
> > desc->page_prot = vma->vm_page_prot;
> > @@ -1379,7 +1379,7 @@ static int call_vma_mapped(struct vm_area_struct *vma)
> > if (!vm_ops || !vm_ops->mapped)
> > return 0;
> >
> > - err = vm_ops->mapped(vma->vm_start, vma->vm_end, vma->vm_pgoff,
> > + err = vm_ops->mapped(vma->vm_start, vma->vm_end, vma_start_pgoff(vma),
> > vma->vm_file, &vm_private_data);
> > if (err)
> > return err;
> > diff --git a/mm/vma.c b/mm/vma.c
> > index dc4c2c1077f4..ee3a8ca13d07 100644
> > --- a/mm/vma.c
> > +++ b/mm/vma.c
> > @@ -967,10 +967,9 @@ static __must_check struct vm_area_struct *vma_merge_existing_range(
> > * prev middle next
> > * extend delete delete
> > */
> > -
> > vmg->start = prev->vm_start;
> > vmg->end = next->vm_end;
> > - vmg->pgoff = prev->vm_pgoff;
> > + vmg->pgoff = vma_start_pgoff(prev);
> >
> > /*
> > * We already ensured anon_vma compatibility above, so now it's
> > @@ -987,9 +986,8 @@ static __must_check struct vm_area_struct *vma_merge_existing_range(
> > * prev middle
> > * extend shrink/delete
> > */
> > -
> > vmg->start = prev->vm_start;
> > - vmg->pgoff = prev->vm_pgoff;
> > + vmg->pgoff = vma_start_pgoff(prev);
> >
> > if (!vmg->__remove_middle)
> > vmg->__adjust_middle_start = true;
> > @@ -1011,13 +1009,13 @@ static __must_check struct vm_area_struct *vma_merge_existing_range(
> >
> > if (vmg->__remove_middle) {
> > vmg->end = next->vm_end;
> > - vmg->pgoff = next->vm_pgoff - pglen;
> > + vmg->pgoff = vma_start_pgoff(next) - pglen;
> > } else {
> > /* We shrink middle and expand next. */
> > vmg->__adjust_next_start = true;
> > vmg->start = middle->vm_start;
> > vmg->end = start;
> > - vmg->pgoff = middle->vm_pgoff;
> > + vmg->pgoff = vma_start_pgoff(middle);
> > }
> >
> > err = dup_anon_vma(next, middle, &anon_dup);
> > @@ -1126,7 +1124,7 @@ struct vm_area_struct *vma_merge_new_range(struct vma_merge_struct *vmg)
> > if (can_merge_left) {
> > vmg->start = prev->vm_start;
> > vmg->target = prev;
> > - vmg->pgoff = prev->vm_pgoff;
> > + vmg->pgoff = vma_start_pgoff(prev);
> >
> > /*
> > * If this merge would result in removal of the next VMA but we
> > @@ -1957,7 +1955,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
> > VM_BUG_ON_VMA(faulted_in_anon_vma, new_vma);
> > *vmap = vma = new_vma;
> > }
> > - *need_rmap_locks = (new_vma->vm_pgoff <= vma->vm_pgoff);
> > + *need_rmap_locks =
> > + (vma_start_pgoff(new_vma) <= vma_start_pgoff(vma));
> > } else {
> > new_vma = vm_area_dup(vma);
> > if (!new_vma)
> > diff --git a/mm/vma_exec.c b/mm/vma_exec.c
> > index 5cee8b7efa0f..e3644a3042e2 100644
> > --- a/mm/vma_exec.c
> > +++ b/mm/vma_exec.c
> > @@ -37,7 +37,7 @@ int relocate_vma_down(struct vm_area_struct *vma, unsigned long shift)
> > unsigned long new_end = old_end - shift;
> > VMA_ITERATOR(vmi, mm, new_start);
> > VMG_STATE(vmg, mm, &vmi, new_start, old_end, EMPTY_VMA_FLAGS,
> > - vma->vm_pgoff);
> > + vma_start_pgoff(vma));
> > struct vm_area_struct *next;
> > struct mmu_gather tlb;
> > PAGETABLE_MOVE(pmc, vma, vma, old_start, new_start, length);
> > @@ -89,7 +89,7 @@ int relocate_vma_down(struct vm_area_struct *vma, unsigned long shift)
> >
> > vma_prev(&vmi);
> > /* Shrink the vma to just the new range */
> > - return vma_shrink(&vmi, vma, new_start, new_end, vma->vm_pgoff);
> > + return vma_shrink(&vmi, vma, new_start, new_end, vma_start_pgoff(vma));
> > }
> >
> > /*
> > diff --git a/mm/vma_init.c b/mm/vma_init.c
> > index 3c0b65950510..a459669a1654 100644
> > --- a/mm/vma_init.c
> > +++ b/mm/vma_init.c
> > @@ -46,7 +46,7 @@ static void vm_area_init_from(const struct vm_area_struct *src,
> > dest->vm_start = src->vm_start;
> > dest->vm_end = src->vm_end;
> > dest->anon_vma = src->anon_vma;
> > - dest->vm_pgoff = src->vm_pgoff;
> > + dest->vm_pgoff = vma_start_pgoff(src);
> > dest->vm_file = src->vm_file;
> > dest->vm_private_data = src->vm_private_data;
> > vm_flags_init(dest, src->vm_flags);
> > --
> > 2.54.0
> >
next prev parent reply other threads:[~2026-07-10 14:53 UTC|newest]
Thread overview: 138+ 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-07-07 14:41 ` David Hildenbrand (Arm)
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-07-07 14:46 ` David Hildenbrand (Arm)
2026-07-10 13:38 ` Lorenzo Stoakes
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-07-10 18:55 ` Gregory Price
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-07-07 16:25 ` Gregory Price
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-07-07 16:26 ` Gregory Price
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-07-09 15:18 ` Gregory Price
2026-07-10 14: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-07-09 15:20 ` Gregory Price
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-07-09 0:06 ` Ackerley Tng
2026-07-09 15:22 ` Gregory Price
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-07-09 15:29 ` Gregory Price
2026-07-10 14:52 ` Lorenzo Stoakes [this message]
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-09 15:49 ` Gregory Price
2026-07-10 14:56 ` Lorenzo Stoakes
2026-07-10 15:09 ` Gregory Price
2026-07-10 15:15 ` Lorenzo Stoakes
2026-07-07 10:20 ` Marek Szyprowski
2026-07-09 15:49 ` Gregory Price
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-07-09 15:50 ` Gregory Price
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-07-09 0:06 ` Ackerley Tng
2026-07-09 10:07 ` Huang, Kai
2026-07-09 15:55 ` Gregory Price
2026-07-09 15:57 ` Gregory Price
2026-07-10 15:01 ` Lorenzo Stoakes
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-07-10 19:05 ` Gregory Price
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-07-10 19:01 ` Gregory Price
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-07-10 19:08 ` Gregory Price
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-07-10 18:57 ` Gregory Price
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-07-10 18:59 ` Gregory Price
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-07-10 19:12 ` Gregory Price
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-07-10 19:20 ` Gregory Price
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
2026-07-10 19:25 ` Gregory Price
2026-07-10 19:35 ` Lorenzo Stoakes
2026-07-10 21:03 ` Gregory Price
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-07-10 15:14 ` Lorenzo Stoakes
2026-07-10 19:38 ` Gregory Price
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-07-10 20:19 ` Gregory Price
2026-07-10 20:25 ` 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
2026-07-10 20:48 ` Gregory Price
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=alEHAF8gEh_sFU_r@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=gourry@gourry.net \
--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