All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>,
	 Andrew Morton <akpm@linux-foundation.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	 Vlastimil Babka <vbabka@kernel.org>,
	Jann Horn <jannh@google.com>, Pedro Falcato <pfalcato@suse.de>,
	 David Hildenbrand <david@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	 Michal Hocko <mhocko@suse.com>, Jonathan Corbet <corbet@lwn.net>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
	 Jason Gunthorpe <jgg@ziepe.ca>,
	Leon Romanovsky <leon@kernel.org>,
	 Paul Moore <paul@paul-moore.com>,
	Stephen Smalley <stephen.smalley.work@gmail.com>,
	 Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	 Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	 Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	 Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Zi Yan <ziy@nvidia.com>,
	 Baolin Wang <baolin.wang@linux.alibaba.com>,
	Nico Pache <nico.pache@linux.dev>,
	 Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
	Barry Song <baohua@kernel.org>,
	 Lance Yang <lance.yang@linux.dev>,
	Usama Arif <usama.arif@linux.dev>,
	 Kiryl Shutsemau <kas@kernel.org>,
	Doug Gilbert <dgilbert@interlog.com>,
	 "James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <mkp@kernel.org>,
	 Jaya Kumar <jayalk@intworks.biz>,
	Simona Vetter <simona@ffwll.ch>, Helge Deller <deller@gmx.de>,
	 Sebastian Reichel <sre@kernel.org>,
	John Hubbard <jhubbard@nvidia.com>, Peter Xu <peterx@redhat.com>,
	 Masami Hiramatsu <mhiramat@kernel.org>,
	Oleg Nesterov <oleg@redhat.com>,
	 Peter Zijlstra <peterz@infradead.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, Arnaldo Carvalho de Melo <acme@kernel.org>,
	 Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	 Rik van Riel <riel@surriel.com>, Harry Yoo <harry@kernel.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	 Vincent Guittot <vincent.guittot@linaro.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	 Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	 David Airlie <airlied@gmail.com>, Will Deacon <will@kernel.org>,
	 "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
	Nick Piggin <npiggin@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	 Muchun Song <muchun.song@linux.dev>,
	Oscar Salvador <osalvador@suse.de>,
	 "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Jan Kara <jack@suse.cz>, Marc Zyngier <maz@kernel.org>,
	 Oliver Upton <oupton@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	 Madhavan Srinivasan <maddy@linux.ibm.com>,
	Anup Patel <anup@brainfault.org>, Paul Walmsley <pjw@kernel.org>,
	 Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	 Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	 Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	 Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	 Vasily Gorbik <gor@linux.ibm.com>,
	"David S. Miller" <davem@davemloft.net>,
	 Andreas Larsson <andreas@gaisler.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	 Christian Brauner <brauner@kernel.org>,
	Matthew Brost <matthew.brost@intel.com>,
	 Joshua Hahn <joshua.hahnjy@gmail.com>,
	Rakie Kim <rakie.kim@sk.com>, Byungchul Park <byungchul@sk.com>,
	 Gregory Price <gourry@gourry.net>,
	Ying Huang <ying.huang@linux.alibaba.com>,
	 Alistair Popple <apopple@nvidia.com>,
	Chris Li <chrisl@kernel.org>, Kairui Song <kasong@tencent.com>,
	 Kemeng Shi <shikemeng@huaweicloud.com>,
	Nhat Pham <nphamcs@gmail.com>, Baoquan He <baoquan.he@linux.dev>,
	 Youngjun Park <youngjun.park@lge.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	 Qi Zheng <qi.zheng@linux.dev>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	 Axel Rasmussen <axelrasmussen@google.com>,
	Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
	 Chengming Zhou <chengming.zhou@linux.dev>,
	Michal Hocko <mhocko@kernel.org>,
	 Miklos Szeredi <miklos@szeredi.hu>, Xu Xin <xu.xin@linux.dev>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-usb@vger.kernel.org,
	 linux-rdma@vger.kernel.org, selinux@vger.kernel.org,
	linux-sound@vger.kernel.org,  bpf@vger.kernel.org,
	linux-scsi@vger.kernel.org, linux-fbdev@vger.kernel.org,
	 dri-devel@lists.freedesktop.org,
	linux-trace-kernel@vger.kernel.org,
	 linux-perf-users@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linuxppc-dev@lists.ozlabs.org,  kvm@vger.kernel.org,
	kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org,
	 linux-s390@vger.kernel.org, sparclinux@vger.kernel.org,
	fuse-devel@lists.linux.dev
Subject: Re: [PATCH v2 01/40] mm/vma: fix mmap_prepare file handling, remove file_doesnt_need_get
Date: Fri, 18 Sep 2026 07:28:33 -0700	[thread overview]
Message-ID: <aq1KeFmXBIEd2YhQ@gmail.com> (raw)
In-Reply-To: <aq06hcheI4OGi_3A@gremlin>

On Fri, Sep 18, 2026 at 02:20:34PM +0100, Lorenzo Stoakes (ARM) wrote:
> On Fri, Sep 18, 2026 at 05:57:51AM -0700, Breno Leitao wrote:
> > On Thu, Sep 17, 2026 at 12:33:41PM +0300, Mike Rapoport wrote:
> > > On Mon, Sep 14, 2026 at 03:57:21PM +0100, Lorenzo Stoakes (ARM) wrote:
> > > > The map->file_doesnt_need_get flag is confusing and the existing
> > > > implementation has holes.
> > > >
> > > > Drivers are permitted to change the owning file of a mapping. If they do
> > > > so, they are required to take a reference on that file.
> > > >
> > > > The mmap() operation which ultimately invokes __mmap_region() is guaranteed
> > > > to drop the refcount for the original file the mapping was made under, but
> > > > this is not true for the replaced file.
> > > >
> > > > This has been addressed so far by tracking map->file_doesnt_need_get, which
> > > > is rather poorly named and unfortunately fails to correctly track whether
> > > > or not an additional put were needed in a number of cases.
> > > >
> > > > Make life easier by removing this flag, and instead drop the reference for
> > > > both mmap_prepare and the deprecated mmap callback in a new function
> > > > put_map().
> > > >
> > > > Track whether this needs to be done by aligning mmap_state with
> > > > vm_area_desc and store the original file in the map->file field, keeping
> > > > the updated file in map->vm_file.
> > > >
> > > > In order to have the same behaviour for both types of hooks, only drop the
> > > > reference __mmap_new_file_vma() itself took in its error path, deferring
> > > > the replaced file's reference to put_map().
> > > >
> > > > To make this work correctly, map->vm_file has to be updated before any
> > > > error handling, so update __mmap_new_file_vma() and call_mmap_prepare() to
> > > > set this field first.
> > > >
> > > > Also when mmap_prepare() changes the file and is then merged, the reference
> > > > count also must be decremented, so update the logic to call put_map() in
> > > > this case too.
> > > >
> > > > Also update __compat_vma_mmap() to manually perform this step for stacked
> > > > file systems using the compatibility layer, and update
> > > > compat_set_vma_from_desc() to replace vma_set_file() with a correct
> > > > refcount/file update.
> > > >
> > > > No in-tree driver is impacted by the incorrect implementation of this
> > > > currently (no driver that does this is mergeable for one), so this does not
> > > > need to be a fix.
> > >
> > > But the patch iteslf needs to be fixed :)
> > >
> > > It seems to be the change that broke the CI.
> > >
> > > The rest is from LLM, take it with a grain of salt :)
> > >
> > > mm-ci mm-unstable red build - bisect analysis
> > > ==============================================
> > >
> > > Bad commit: 2a937a04babf1 "mm/vma: fix mmap_prepare file handling, remove
> > > file_doesnt_need_get" - first patch of Lorenzo Stoakes' 40-patch series
> > > "mm: make VMA flag semantics explicit, eliminate VM_SPECIAL" (v2).
> > > https://lore.kernel.org/all/20260914-b4-mmap-prepare-vma-flag-sanify-v2-0-7d9781ed5361@kernel.org
> > >
> > > Symptom: tools/testing/selftests/mm/pfnmap.c triggers
> > > "BUG: Bad page map in process pfnmap" during __zap_vma_range()/vm_normal_page(),
> > > seen on process exit/munmap. CI's run-mm-selftests.sh greps guest dmesg for
> > > BUG|WARNING and fails the job regardless of the test's own exit code.
> >
> > I am seeing something similar here and stress-ng can reproduce it:
> >
> >       WARNING: mm/memory.c:3225 at do_remap_pfn_range+0x9b4/0x9f0, CPU#25: stress-ng-dev/354858
> >       Call trace:
> >        do_remap_pfn_range+0x9b4/0x9f0 (P)
> >        remap_pfn_range_complete+0xac/0xd0
> >        mmap_action_complete+0xcc/0x3d8
> >        mmap_region+0xb54/0x1978
> >        do_mmap+0x588/0xb18
> >        vm_mmap_pgoff+0x1e4/0x320
> >        ksys_mmap_pgoff+0x2d8/0x510
> >        __arm64_sys_mmap+0x100/0x128
> >
> >       BUG: Bad page map in process stress-ng-dev  pte:0160000000000fcf
> >       addr:0000ffe8d9080000 vm_flags:00000071 anon_vma:0000000000000000 mapping:ffff0000a0c4ea98 index:0 (file) ffe8d9080 (anon)
> >       file:mem fault:0x0 mmap:0x0 mmap_prepare: mmap_mem_prepare read_folio:0x0
> >       Call trace:
> >        print_bad_page_map+0x63c/0x740
> >        vm_normal_page+0x228/0x240
> >        __zap_vma_range+0xbe0/0x34a0
> >        unmap_vmas+0x240/0x318
> >        unmap_region+0x12c/0x238
> >        vms_complete_munmap_vmas+0x318/0x958
> >        do_vmi_align_munmap+0x254/0x2f8
> >        do_vmi_munmap+0xc4/0xf8
> >        __vm_munmap+0x174/0x288
> >        __arm64_sys_munmap+0x70/0x90
> 
> Yup I already fixed it and respun the series :)
> 
> https://lore.kernel.org/all/20260917-b4-mmap-prepare-vma-flag-sanify-v3-0-4583d8a23bca@kernel.org/

Very nice, thanks. I will give it a try!

WARNING: multiple messages have this Message-ID (diff)
From: Breno Leitao <leitao@debian.org>
To: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>, Jann Horn <jannh@google.com>,
	Pedro Falcato <pfalcato@suse.de>,
	David Hildenbrand <david@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	Paul Moore <paul@paul-moore.com>,
	Stephen Smalley <stephen.smalley.work@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Zi Yan <ziy@nvidia.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Nico Pache <nico.pache@linux.dev>,
	Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
	Barry Song <baohua@kernel.org>, Lance Yang <lance.yang@linux.dev>,
	Usama Arif <usama.arif@linux.dev>,
	Kiryl Shutsemau <kas@kernel.org>,
	Doug Gilbert <dgilbert@interlog.com>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <mkp@kernel.org>,
	Jaya Kumar <jayalk@intworks.biz>, Simona Vetter <simona@ffwll.ch>,
	Helge Deller <deller@gmx.de>, Sebastian Reichel <sre@kernel.org>,
	John Hubbard <jhubbard@nvidia.com>, Peter Xu <peterx@redhat.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Peter Zijlstra <peterz@infradead.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, Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Rik van Riel <riel@surriel.com>, Harry Yoo <harry@kernel.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Will Deacon <will@kernel.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
	Nick Piggin <npiggin@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	Muchun Song <muchun.song@linux.dev>,
	Oscar Salvador <osalvador@suse.de>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Jan Kara <jack@suse.cz>, Marc Zyngier <maz@kernel.org>,
	Oliver Upton <oupton@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Anup Patel <anup@brainfault.org>, Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	"David S. Miller" <davem@davemloft.net>,
	Andreas Larsson <andreas@gaisler.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>,
	Matthew Brost <matthew.brost@intel.com>,
	Joshua Hahn <joshua.hahnjy@gmail.com>,
	Rakie Kim <rakie.kim@sk.com>, Byungchul Park <byungchul@sk.com>,
	Gregory Price <gourry@gourry.net>,
	Ying Huang <ying.huang@linux.alibaba.com>,
	Alistair Popple <apopple@nvidia.com>,
	Chris Li <chrisl@kernel.org>, Kairui Song <kasong@tencent.com>,
	Kemeng Shi <shikemeng@huaweicloud.com>,
	Nhat Pham <nphamcs@gmail.com>, Baoquan He <baoquan.he@linux.dev>,
	Youngjun Park <youngjun.park@lge.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Qi Zheng <qi.zheng@linux.dev>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	Axel Rasmussen <axelrasmussen@google.com>,
	Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
	Chengming Zhou <chengming.zhou@linux.dev>,
	Michal Hocko <mhocko@kernel.org>,
	 Miklos Szeredi <miklos@szeredi.hu>, Xu Xin <xu.xin@linux.dev>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-rdma@vger.kernel.org, selinux@vger.kernel.org,
	linux-sound@vger.kernel.org, bpf@vger.kernel.org,
	linux-scsi@vger.kernel.org, linux-fbdev@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-trace-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
	kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org, sparclinux@vger.kernel.org,
	fuse-devel@lists.linux.dev
Subject: Re: [PATCH v2 01/40] mm/vma: fix mmap_prepare file handling, remove file_doesnt_need_get
Date: Fri, 18 Sep 2026 07:28:33 -0700	[thread overview]
Message-ID: <aq1KeFmXBIEd2YhQ@gmail.com> (raw)
In-Reply-To: <aq06hcheI4OGi_3A@gremlin>

On Fri, Sep 18, 2026 at 02:20:34PM +0100, Lorenzo Stoakes (ARM) wrote:
> On Fri, Sep 18, 2026 at 05:57:51AM -0700, Breno Leitao wrote:
> > On Thu, Sep 17, 2026 at 12:33:41PM +0300, Mike Rapoport wrote:
> > > On Mon, Sep 14, 2026 at 03:57:21PM +0100, Lorenzo Stoakes (ARM) wrote:
> > > > The map->file_doesnt_need_get flag is confusing and the existing
> > > > implementation has holes.
> > > >
> > > > Drivers are permitted to change the owning file of a mapping. If they do
> > > > so, they are required to take a reference on that file.
> > > >
> > > > The mmap() operation which ultimately invokes __mmap_region() is guaranteed
> > > > to drop the refcount for the original file the mapping was made under, but
> > > > this is not true for the replaced file.
> > > >
> > > > This has been addressed so far by tracking map->file_doesnt_need_get, which
> > > > is rather poorly named and unfortunately fails to correctly track whether
> > > > or not an additional put were needed in a number of cases.
> > > >
> > > > Make life easier by removing this flag, and instead drop the reference for
> > > > both mmap_prepare and the deprecated mmap callback in a new function
> > > > put_map().
> > > >
> > > > Track whether this needs to be done by aligning mmap_state with
> > > > vm_area_desc and store the original file in the map->file field, keeping
> > > > the updated file in map->vm_file.
> > > >
> > > > In order to have the same behaviour for both types of hooks, only drop the
> > > > reference __mmap_new_file_vma() itself took in its error path, deferring
> > > > the replaced file's reference to put_map().
> > > >
> > > > To make this work correctly, map->vm_file has to be updated before any
> > > > error handling, so update __mmap_new_file_vma() and call_mmap_prepare() to
> > > > set this field first.
> > > >
> > > > Also when mmap_prepare() changes the file and is then merged, the reference
> > > > count also must be decremented, so update the logic to call put_map() in
> > > > this case too.
> > > >
> > > > Also update __compat_vma_mmap() to manually perform this step for stacked
> > > > file systems using the compatibility layer, and update
> > > > compat_set_vma_from_desc() to replace vma_set_file() with a correct
> > > > refcount/file update.
> > > >
> > > > No in-tree driver is impacted by the incorrect implementation of this
> > > > currently (no driver that does this is mergeable for one), so this does not
> > > > need to be a fix.
> > >
> > > But the patch iteslf needs to be fixed :)
> > >
> > > It seems to be the change that broke the CI.
> > >
> > > The rest is from LLM, take it with a grain of salt :)
> > >
> > > mm-ci mm-unstable red build - bisect analysis
> > > ==============================================
> > >
> > > Bad commit: 2a937a04babf1 "mm/vma: fix mmap_prepare file handling, remove
> > > file_doesnt_need_get" - first patch of Lorenzo Stoakes' 40-patch series
> > > "mm: make VMA flag semantics explicit, eliminate VM_SPECIAL" (v2).
> > > https://lore.kernel.org/all/20260914-b4-mmap-prepare-vma-flag-sanify-v2-0-7d9781ed5361@kernel.org
> > >
> > > Symptom: tools/testing/selftests/mm/pfnmap.c triggers
> > > "BUG: Bad page map in process pfnmap" during __zap_vma_range()/vm_normal_page(),
> > > seen on process exit/munmap. CI's run-mm-selftests.sh greps guest dmesg for
> > > BUG|WARNING and fails the job regardless of the test's own exit code.
> >
> > I am seeing something similar here and stress-ng can reproduce it:
> >
> >       WARNING: mm/memory.c:3225 at do_remap_pfn_range+0x9b4/0x9f0, CPU#25: stress-ng-dev/354858
> >       Call trace:
> >        do_remap_pfn_range+0x9b4/0x9f0 (P)
> >        remap_pfn_range_complete+0xac/0xd0
> >        mmap_action_complete+0xcc/0x3d8
> >        mmap_region+0xb54/0x1978
> >        do_mmap+0x588/0xb18
> >        vm_mmap_pgoff+0x1e4/0x320
> >        ksys_mmap_pgoff+0x2d8/0x510
> >        __arm64_sys_mmap+0x100/0x128
> >
> >       BUG: Bad page map in process stress-ng-dev  pte:0160000000000fcf
> >       addr:0000ffe8d9080000 vm_flags:00000071 anon_vma:0000000000000000 mapping:ffff0000a0c4ea98 index:0 (file) ffe8d9080 (anon)
> >       file:mem fault:0x0 mmap:0x0 mmap_prepare: mmap_mem_prepare read_folio:0x0
> >       Call trace:
> >        print_bad_page_map+0x63c/0x740
> >        vm_normal_page+0x228/0x240
> >        __zap_vma_range+0xbe0/0x34a0
> >        unmap_vmas+0x240/0x318
> >        unmap_region+0x12c/0x238
> >        vms_complete_munmap_vmas+0x318/0x958
> >        do_vmi_align_munmap+0x254/0x2f8
> >        do_vmi_munmap+0xc4/0xf8
> >        __vm_munmap+0x174/0x288
> >        __arm64_sys_munmap+0x70/0x90
> 
> Yup I already fixed it and respun the series :)
> 
> https://lore.kernel.org/all/20260917-b4-mmap-prepare-vma-flag-sanify-v3-0-4583d8a23bca@kernel.org/

Very nice, thanks. I will give it a try!

-- 
kvm-riscv mailing list
kvm-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kvm-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Breno Leitao <leitao@debian.org>
To: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>, Jann Horn <jannh@google.com>,
	Pedro Falcato <pfalcato@suse.de>,
	David Hildenbrand <david@kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>, Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	Paul Moore <paul@paul-moore.com>,
	Stephen Smalley <stephen.smalley.work@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Zi Yan <ziy@nvidia.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Nico Pache <nico.pache@linux.dev>,
	Ryan Roberts <ryan.roberts@arm.com>, Dev Jain <dev.jain@arm.com>,
	Barry Song <baohua@kernel.org>, Lance Yang <lance.yang@linux.dev>,
	Usama Arif <usama.arif@linux.dev>,
	Kiryl Shutsemau <kas@kernel.org>,
	Doug Gilbert <dgilbert@interlog.com>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <mkp@kernel.org>,
	Jaya Kumar <jayalk@intworks.biz>, Simona Vetter <simona@ffwll.ch>,
	Helge Deller <deller@gmx.de>, Sebastian Reichel <sre@kernel.org>,
	John Hubbard <jhubbard@nvidia.com>, Peter Xu <peterx@redhat.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Peter Zijlstra <peterz@infradead.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, Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Rik van Riel <riel@surriel.com>, Harry Yoo <harry@kernel.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Will Deacon <will@kernel.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
	Nick Piggin <npiggin@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	Muchun Song <muchun.song@linux.dev>,
	Oscar Salvador <osalvador@suse.de>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Jan Kara <jack@suse.cz>, Marc Zyngier <maz@kernel.org>,
	Oliver Upton <oupton@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Anup Patel <anup@brainfault.org>, Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	"David S. Miller" <davem@davemloft.net>,
	Andreas Larsson <andreas@gaisler.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>,
	Matthew Brost <matthew.brost@intel.com>,
	Joshua Hahn <joshua.hahnjy@gmail.com>,
	Rakie Kim <rakie.kim@sk.com>, Byungchul Park <byungchul@sk.com>,
	Gregory Price <gourry@gourry.net>,
	Ying Huang <ying.huang@linux.alibaba.com>,
	Alistair Popple <apopple@nvidia.com>,
	Chris Li <chrisl@kernel.org>, Kairui Song <kasong@tencent.com>,
	Kemeng Shi <shikemeng@huaweicloud.com>,
	Nhat Pham <nphamcs@gmail.com>, Baoquan He <baoquan.he@linux.dev>,
	Youngjun Park <youngjun.park@lge.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Qi Zheng <qi.zheng@linux.dev>,
	Shakeel Butt <shakeel.butt@linux.dev>,
	Axel Rasmussen <axelrasmussen@google.com>,
	Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
	Chengming Zhou <chengming.zhou@linux.dev>,
	Michal Hocko <mhocko@kernel.org>,
	 Miklos Szeredi <miklos@szeredi.hu>, Xu Xin <xu.xin@linux.dev>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-rdma@vger.kernel.org, selinux@vger.kernel.org,
	linux-sound@vger.kernel.org, bpf@vger.kernel.org,
	linux-scsi@vger.kernel.org, linux-fbdev@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-trace-kernel@vger.kernel.org,
	linux-perf-users@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
	kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org,
	linux-s390@vger.kernel.org, sparclinux@vger.kernel.org,
	fuse-devel@lists.linux.dev
Subject: Re: [PATCH v2 01/40] mm/vma: fix mmap_prepare file handling, remove file_doesnt_need_get
Date: Fri, 18 Sep 2026 07:28:33 -0700	[thread overview]
Message-ID: <aq1KeFmXBIEd2YhQ@gmail.com> (raw)
In-Reply-To: <aq06hcheI4OGi_3A@gremlin>

On Fri, Sep 18, 2026 at 02:20:34PM +0100, Lorenzo Stoakes (ARM) wrote:
> On Fri, Sep 18, 2026 at 05:57:51AM -0700, Breno Leitao wrote:
> > On Thu, Sep 17, 2026 at 12:33:41PM +0300, Mike Rapoport wrote:
> > > On Mon, Sep 14, 2026 at 03:57:21PM +0100, Lorenzo Stoakes (ARM) wrote:
> > > > The map->file_doesnt_need_get flag is confusing and the existing
> > > > implementation has holes.
> > > >
> > > > Drivers are permitted to change the owning file of a mapping. If they do
> > > > so, they are required to take a reference on that file.
> > > >
> > > > The mmap() operation which ultimately invokes __mmap_region() is guaranteed
> > > > to drop the refcount for the original file the mapping was made under, but
> > > > this is not true for the replaced file.
> > > >
> > > > This has been addressed so far by tracking map->file_doesnt_need_get, which
> > > > is rather poorly named and unfortunately fails to correctly track whether
> > > > or not an additional put were needed in a number of cases.
> > > >
> > > > Make life easier by removing this flag, and instead drop the reference for
> > > > both mmap_prepare and the deprecated mmap callback in a new function
> > > > put_map().
> > > >
> > > > Track whether this needs to be done by aligning mmap_state with
> > > > vm_area_desc and store the original file in the map->file field, keeping
> > > > the updated file in map->vm_file.
> > > >
> > > > In order to have the same behaviour for both types of hooks, only drop the
> > > > reference __mmap_new_file_vma() itself took in its error path, deferring
> > > > the replaced file's reference to put_map().
> > > >
> > > > To make this work correctly, map->vm_file has to be updated before any
> > > > error handling, so update __mmap_new_file_vma() and call_mmap_prepare() to
> > > > set this field first.
> > > >
> > > > Also when mmap_prepare() changes the file and is then merged, the reference
> > > > count also must be decremented, so update the logic to call put_map() in
> > > > this case too.
> > > >
> > > > Also update __compat_vma_mmap() to manually perform this step for stacked
> > > > file systems using the compatibility layer, and update
> > > > compat_set_vma_from_desc() to replace vma_set_file() with a correct
> > > > refcount/file update.
> > > >
> > > > No in-tree driver is impacted by the incorrect implementation of this
> > > > currently (no driver that does this is mergeable for one), so this does not
> > > > need to be a fix.
> > >
> > > But the patch iteslf needs to be fixed :)
> > >
> > > It seems to be the change that broke the CI.
> > >
> > > The rest is from LLM, take it with a grain of salt :)
> > >
> > > mm-ci mm-unstable red build - bisect analysis
> > > ==============================================
> > >
> > > Bad commit: 2a937a04babf1 "mm/vma: fix mmap_prepare file handling, remove
> > > file_doesnt_need_get" - first patch of Lorenzo Stoakes' 40-patch series
> > > "mm: make VMA flag semantics explicit, eliminate VM_SPECIAL" (v2).
> > > https://lore.kernel.org/all/20260914-b4-mmap-prepare-vma-flag-sanify-v2-0-7d9781ed5361@kernel.org
> > >
> > > Symptom: tools/testing/selftests/mm/pfnmap.c triggers
> > > "BUG: Bad page map in process pfnmap" during __zap_vma_range()/vm_normal_page(),
> > > seen on process exit/munmap. CI's run-mm-selftests.sh greps guest dmesg for
> > > BUG|WARNING and fails the job regardless of the test's own exit code.
> >
> > I am seeing something similar here and stress-ng can reproduce it:
> >
> >       WARNING: mm/memory.c:3225 at do_remap_pfn_range+0x9b4/0x9f0, CPU#25: stress-ng-dev/354858
> >       Call trace:
> >        do_remap_pfn_range+0x9b4/0x9f0 (P)
> >        remap_pfn_range_complete+0xac/0xd0
> >        mmap_action_complete+0xcc/0x3d8
> >        mmap_region+0xb54/0x1978
> >        do_mmap+0x588/0xb18
> >        vm_mmap_pgoff+0x1e4/0x320
> >        ksys_mmap_pgoff+0x2d8/0x510
> >        __arm64_sys_mmap+0x100/0x128
> >
> >       BUG: Bad page map in process stress-ng-dev  pte:0160000000000fcf
> >       addr:0000ffe8d9080000 vm_flags:00000071 anon_vma:0000000000000000 mapping:ffff0000a0c4ea98 index:0 (file) ffe8d9080 (anon)
> >       file:mem fault:0x0 mmap:0x0 mmap_prepare: mmap_mem_prepare read_folio:0x0
> >       Call trace:
> >        print_bad_page_map+0x63c/0x740
> >        vm_normal_page+0x228/0x240
> >        __zap_vma_range+0xbe0/0x34a0
> >        unmap_vmas+0x240/0x318
> >        unmap_region+0x12c/0x238
> >        vms_complete_munmap_vmas+0x318/0x958
> >        do_vmi_align_munmap+0x254/0x2f8
> >        do_vmi_munmap+0xc4/0xf8
> >        __vm_munmap+0x174/0x288
> >        __arm64_sys_munmap+0x70/0x90
> 
> Yup I already fixed it and respun the series :)
> 
> https://lore.kernel.org/all/20260917-b4-mmap-prepare-vma-flag-sanify-v3-0-4583d8a23bca@kernel.org/

Very nice, thanks. I will give it a try!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-09-18 14:30 UTC|newest]

Thread overview: 209+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 14:57 [PATCH v2 00/40] mm: make VMA flag semantics explicit, eliminate VM_SPECIAL Lorenzo Stoakes (ARM)
2026-09-14 14:57 ` Lorenzo Stoakes (ARM)
2026-09-14 14:57 ` Lorenzo Stoakes (ARM)
2026-09-14 14:57 ` [PATCH v2 01/40] mm/vma: fix mmap_prepare file handling, remove file_doesnt_need_get Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 15:40   ` sashiko-bot
2026-09-17  9:33   ` Mike Rapoport
2026-09-17  9:33     ` Mike Rapoport
2026-09-17  9:33     ` Mike Rapoport
2026-09-17  9:57     ` Lorenzo Stoakes (ARM)
2026-09-17  9:57       ` Lorenzo Stoakes (ARM)
2026-09-17  9:57       ` Lorenzo Stoakes (ARM)
2026-09-17 11:40       ` Lorenzo Stoakes (ARM)
2026-09-17 11:40         ` Lorenzo Stoakes (ARM)
2026-09-17 11:40         ` Lorenzo Stoakes (ARM)
2026-09-18 12:57     ` Breno Leitao
2026-09-18 12:57       ` Breno Leitao
2026-09-18 12:57       ` Breno Leitao
2026-09-18 13:20       ` Lorenzo Stoakes (ARM)
2026-09-18 13:20         ` Lorenzo Stoakes (ARM)
2026-09-18 13:20         ` Lorenzo Stoakes (ARM)
2026-09-18 14:28         ` Breno Leitao [this message]
2026-09-18 14:28           ` Breno Leitao
2026-09-18 14:28           ` Breno Leitao
2026-09-14 14:57 ` [PATCH v2 02/40] mm/vma: predicate setting mmap_prepare VMA fields on new vma alloc Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 15:55   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 03/40] mm/vma: introduce and use vma_[flags_]can_merge() Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 15:59   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 04/40] mm: consistently validate VMA state after mmap[_prepare] hooks Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 16:18   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 05/40] mm/vma: ensure mmap_prepare doesn't set actions on a mergeable vma Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 16:45   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 06/40] mm: make map_kernel_pages_[prepare,complete] internal and unexported Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 16:47   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 07/40] mm/vma: tidy up map kernel pages enum values Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 16:50   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 08/40] mm: add mmap action for discontiguous kernel page mapping Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 17:03   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 09/40] docs: filesystems: update mmap_prepare docs for discontig kernel pgs Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 17:07   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 10/40] drivers/usb/mon: update to use mmap_prepare + map kernel pages Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 17:18   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 11/40] infiniband: update hfi1 to use remap_vmalloc_range() Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 17:39   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 12/40] selinux: reject writable opens of policy file, drop mmap shared/write check Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 17:57   ` sashiko-bot
2026-09-14 19:57   ` Paul Moore
2026-09-14 19:57     ` Paul Moore
2026-09-14 19:57     ` Paul Moore
2026-09-14 14:57 ` [PATCH v2 13/40] ALSA: pcm: use vm_insert_page() to map PCM status page Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 18:30   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 14/40] bpf: arena: mark arena_map_mmap() mappings VM_MIXEDMAP Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 18:46   ` sashiko-bot
2026-09-14 23:17   ` Emil Tsalapatis
2026-09-14 14:57 ` [PATCH v2 15/40] mm/vma: add vma[_flags]_is_kernel_owned() predicates Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 18:50   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 16/40] mm/vma: only allow mmap to clear VMA_MAYWRITE_BIT if kernel-owned Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 19:14   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 17/40] mm/vma: add and use vma_[flags]_is_fixed_mapping Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 19:24   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 18/40] scsi: sg: convert mmap hook to mmap_prepare and rework Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 19:30   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 19/40] fbdev: defio: assert FBINFO_VIRTFB, drop VM_IO, add VM_MIXEDMAP Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 19:44   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 20/40] HSI: cmt_speech: convert mmap hook to mmap_prepare, refactor Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 20:15   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 21/40] mm/gup: error out early on !VMA_MAYREAD_BIT VMAs Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 20:33   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 22/40] uprobes: remove VM_IO, set VM_MIXEDMAP for mapped kernel pages Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 20:47   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 23/40] mm/mlock: clear VMA_LOCKED_MASK over mmap callback Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 21:09   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 24/40] mm/mlock: eliminate weird VMA_IO_BIT abuse and simplify Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 21:44   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 25/40] mm/vma: enforce that only kernel-owned mappings may set VMA_IO_BIT Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:18   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 26/40] mm: remove VMA_IO_BIT check in vma[_flags]_is_kernel_owned() Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:09   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 27/40] mm: remove hugetlb_inline.h Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:09   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 28/40] mm: rename is_vm_hugetlb_page() to vma_is_hugetlb() Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57 ` [PATCH v2 29/40] mm: drop some redundant checks around hugetlb VMAs Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:08   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 30/40] mm/madvise: update is_valid_guard_vma() to use vma_can_merge() Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:14   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 31/40] mm/vma: introduce vma[_flags]_is_persistent() Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:12   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 32/40] mm/uffd: use predicates for userfaultfd checks Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:16   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 33/40] mm/madvise: use predicates for madvise(..., MADV_DOFORK) Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:18   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 34/40] mm: eliminate VMA_SPECIAL_FLAGS usage when hugetlb explicitly tested Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:21   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 35/40] mm: eliminate VMA_SPECIAL_FLAGS check in lru_gen_look_around() Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:22   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 36/40] mm: avoid use of VMA_SPECIAL_FLAGS in migrate_vma_setup() Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:23   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 37/40] mm: eliminate VM_SPECIAL, VMA_SPECIAL_FLAGS Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:19   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 38/40] fuse: dax: do not set VM_MIXEDMAP Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:30   ` sashiko-bot
2026-09-14 14:57 ` [PATCH v2 39/40] mm/huge_memory: remove vma_is_special_huge() Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 14:57   ` Lorenzo Stoakes (ARM)
2026-09-14 22:26   ` sashiko-bot
2026-09-14 14:58 ` [PATCH v2 40/40] mm/vma: introduce and use vma[_flags]_can_gup() Lorenzo Stoakes (ARM)
2026-09-14 14:58   ` Lorenzo Stoakes (ARM)
2026-09-14 14:58   ` Lorenzo Stoakes (ARM)
2026-09-14 22:25   ` sashiko-bot
2026-09-15  1:08 ` [PATCH v2 00/40] mm: make VMA flag semantics explicit, eliminate VM_SPECIAL Andrew Morton
2026-09-15  1:08   ` Andrew Morton
2026-09-15  1:08   ` Andrew Morton
2026-09-15  8:35   ` Lorenzo Stoakes (ARM)
2026-09-18 20:20   ` David Hildenbrand (Arm)
2026-09-18 20:20     ` David Hildenbrand (Arm)
2026-09-18 20:20     ` David Hildenbrand (Arm)
2026-09-18 20:31     ` Suren Baghdasaryan
2026-09-18 20:31       ` Suren Baghdasaryan
2026-09-18 20:31       ` Suren Baghdasaryan
2026-09-19 15:05       ` Lorenzo Stoakes (ARM)
2026-09-19 15:05         ` Lorenzo Stoakes (ARM)
2026-09-19 15:05         ` Lorenzo Stoakes (ARM)
2026-09-19 15:09         ` Lorenzo Stoakes (ARM)
2026-09-19 15:09           ` Lorenzo Stoakes (ARM)
2026-09-19 15:09           ` Lorenzo Stoakes (ARM)
2026-09-23  8:13           ` Lorenzo Stoakes (ARM)
2026-09-23  8:13             ` Lorenzo Stoakes (ARM)
2026-09-23  8:13             ` Lorenzo Stoakes (ARM)
2026-09-23  8:39             ` David Hildenbrand (Arm)
2026-09-23  8:39               ` David Hildenbrand (Arm)
2026-09-23  8:39               ` David Hildenbrand (Arm)
2026-09-23 14:31               ` Suren Baghdasaryan
2026-09-23 14:31                 ` Suren Baghdasaryan
2026-09-23 14:31                 ` Suren Baghdasaryan

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=aq1KeFmXBIEd2YhQ@gmail.com \
    --to=leitao@debian.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=acme@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=airlied@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreas@gaisler.com \
    --cc=andrii@kernel.org \
    --cc=aneesh.kumar@kernel.org \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=apopple@nvidia.com \
    --cc=arnd@arndb.de \
    --cc=ast@kernel.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=baoquan.he@linux.dev \
    --cc=borntraeger@linux.ibm.com \
    --cc=bp@alien8.de \
    --cc=bpf@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=byungchul@sk.com \
    --cc=catalin.marinas@arm.com \
    --cc=chengming.zhou@linux.dev \
    --cc=chrisl@kernel.org \
    --cc=corbet@lwn.net \
    --cc=daniel@iogearbox.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=david@kernel.org \
    --cc=deller@gmx.de \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=dev.jain@arm.com \
    --cc=dgilbert@interlog.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eddyz87@gmail.com \
    --cc=frankja@linux.ibm.com \
    --cc=fuse-devel@lists.linux.dev \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=gourry@gourry.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=harry@kernel.org \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=jack@suse.cz \
    --cc=jannh@google.com \
    --cc=jayalk@intworks.biz \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=joshua.hahnjy@gmail.com \
    --cc=juri.lelli@redhat.com \
    --cc=kas@kernel.org \
    --cc=kasong@tencent.com \
    --cc=kvm-riscv@lists.infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=lance.yang@linux.dev \
    --cc=leon@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ljs@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maddy@linux.ibm.com \
    --cc=mark.rutland@arm.com \
    --cc=matthew.brost@intel.com \
    --cc=maz@kernel.org \
    --cc=memxor@gmail.com \
    --cc=mhiramat@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    --cc=miklos@szeredi.hu \
    --cc=mingo@redhat.com \
    --cc=mkp@kernel.org \
    --cc=mripard@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=namhyung@kernel.org \
    --cc=nico.pache@linux.dev \
    --cc=nphamcs@gmail.com \
    --cc=npiggin@gmail.com \
    --cc=oleg@redhat.com \
    --cc=osalvador@suse.de \
    --cc=oupton@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul@paul-moore.com \
    --cc=perex@perex.cz \
    --cc=peterx@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pfalcato@suse.de \
    --cc=pjw@kernel.org \
    --cc=qi.zheng@linux.dev \
    --cc=rakie.kim@sk.com \
    --cc=riel@surriel.com \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=selinux@vger.kernel.org \
    --cc=shakeel.butt@linux.dev \
    --cc=shikemeng@huaweicloud.com \
    --cc=simona@ffwll.ch \
    --cc=sparclinux@vger.kernel.org \
    --cc=sre@kernel.org \
    --cc=stephen.smalley.work@gmail.com \
    --cc=surenb@google.com \
    --cc=tglx@kernel.org \
    --cc=tiwai@suse.com \
    --cc=tzimmermann@suse.de \
    --cc=usama.arif@linux.dev \
    --cc=vbabka@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=weixugc@google.com \
    --cc=will@kernel.org \
    --cc=willy@infradead.org \
    --cc=x86@kernel.org \
    --cc=xu.xin@linux.dev \
    --cc=ying.huang@linux.alibaba.com \
    --cc=youngjun.park@lge.com \
    --cc=yuanchu@google.com \
    --cc=ziy@nvidia.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.