From: "Zi Yan" <ziy@nvidia.com>
To: "Lorenzo Stoakes (ARM)" <ljs@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>,
"Mike Rapoport" <rppt@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>,
"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>
Cc: <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 v3 16/40] mm/vma: only allow mmap to clear VMA_MAYWRITE_BIT if kernel-owned
Date: Fri, 25 Sep 2026 22:17:10 -0400 [thread overview]
Message-ID: <DLOVXY4VFCXE.1RI7ZSD30VHH5@nvidia.com> (raw)
In-Reply-To: <DLOVQMACWLZ5.1WFOTGRG8ZG92@nvidia.com>
On Fri Sep 25, 2026 at 10:07 PM EDT, Zi Yan wrote:
> On Thu Sep 17, 2026 at 12:22 PM EDT, Lorenzo Stoakes (ARM) wrote:
>> For ordinary files the only way the VMA_MAYWRITE_BIT flag is cleared is if
>> the underlying file is itself read-only.
>>
>> This means that mprotect() cannot mark a shared mapping of a read-only file
>> as read/write, as doing so would violate the read only attribute, and
>> permit writes.
>>
>> In general, we do not want file systems to be able to do this for
>> read/write files.
>>
>> Doing so would violate fundamental user expectation of file attributes and
>> likely break userspace.
>>
>> However, drivers pose a tricky problem here - the /dev/xxx file may be
>> read/write but provide access to a resource which is fundamentally
>> read-only.
>>
>> Therefore we must allow drivers to be able to clear VMA_MAYWRITE_BIT.
IIUC, a file's FMODE_* bear both fd and mmap permissions, e.g.,
FMODE_WRITE means fd is writable and mmap is writable. At least for
normal files. But a driver fd might not fit the same pattern. Would a
new FMODE_MAP_READ and a new FMODE_MAP_WRITE help? Not trying to propose
anything, but just thinking out load.
>>
>> To achieve both of these things, restrict this ability to kernel-owned
>> mappings as identified by vma_flags_is_kernel_owned().
>>
>> This constrains this ability to drivers which own the mapping's contents,
>> whether memory-mapped I/O, kernel-allocated pages, or ordinary pages they
>> map themselves, and so define its semantics.
>>
>> Every in-tree mmap hook which clears VMA_MAYWRITE_BIT, some twenty sites
>> across drivers, filesystems and bpf, establishes a kernel-owned mapping,
>> with usbmon and the ALSA PCM status page converted earlier in this series
>> to do so.
>>
>> Note that drivers may, if they do not gate on VMA_SHARED_BIT, be able to
>> disable MAP_PRIVATE-file-backed mapping CoW semantics.
>>
>> This is perhaps not always intended, but we retain this capacity to
>> maintain existing behaviour.
>>
>> As all drivers which clear VMA_MAYWRITE_BIT establish kernel-owned
>> mappings, no functional change is intended.
>>
>> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
>> ---
>> mm/vma.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>
> Makes sense.
>
> Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
WARNING: multiple messages have this Message-ID (diff)
From: "Zi Yan" <ziy@nvidia.com>
To: "Lorenzo Stoakes (ARM)" <ljs@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>,
"Mike Rapoport" <rppt@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>,
"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>
Cc: <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 v3 16/40] mm/vma: only allow mmap to clear VMA_MAYWRITE_BIT if kernel-owned
Date: Fri, 25 Sep 2026 22:17:10 -0400 [thread overview]
Message-ID: <DLOVXY4VFCXE.1RI7ZSD30VHH5@nvidia.com> (raw)
In-Reply-To: <DLOVQMACWLZ5.1WFOTGRG8ZG92@nvidia.com>
On Fri Sep 25, 2026 at 10:07 PM EDT, Zi Yan wrote:
> On Thu Sep 17, 2026 at 12:22 PM EDT, Lorenzo Stoakes (ARM) wrote:
>> For ordinary files the only way the VMA_MAYWRITE_BIT flag is cleared is if
>> the underlying file is itself read-only.
>>
>> This means that mprotect() cannot mark a shared mapping of a read-only file
>> as read/write, as doing so would violate the read only attribute, and
>> permit writes.
>>
>> In general, we do not want file systems to be able to do this for
>> read/write files.
>>
>> Doing so would violate fundamental user expectation of file attributes and
>> likely break userspace.
>>
>> However, drivers pose a tricky problem here - the /dev/xxx file may be
>> read/write but provide access to a resource which is fundamentally
>> read-only.
>>
>> Therefore we must allow drivers to be able to clear VMA_MAYWRITE_BIT.
IIUC, a file's FMODE_* bear both fd and mmap permissions, e.g.,
FMODE_WRITE means fd is writable and mmap is writable. At least for
normal files. But a driver fd might not fit the same pattern. Would a
new FMODE_MAP_READ and a new FMODE_MAP_WRITE help? Not trying to propose
anything, but just thinking out load.
>>
>> To achieve both of these things, restrict this ability to kernel-owned
>> mappings as identified by vma_flags_is_kernel_owned().
>>
>> This constrains this ability to drivers which own the mapping's contents,
>> whether memory-mapped I/O, kernel-allocated pages, or ordinary pages they
>> map themselves, and so define its semantics.
>>
>> Every in-tree mmap hook which clears VMA_MAYWRITE_BIT, some twenty sites
>> across drivers, filesystems and bpf, establishes a kernel-owned mapping,
>> with usbmon and the ALSA PCM status page converted earlier in this series
>> to do so.
>>
>> Note that drivers may, if they do not gate on VMA_SHARED_BIT, be able to
>> disable MAP_PRIVATE-file-backed mapping CoW semantics.
>>
>> This is perhaps not always intended, but we retain this capacity to
>> maintain existing behaviour.
>>
>> As all drivers which clear VMA_MAYWRITE_BIT establish kernel-owned
>> mappings, no functional change is intended.
>>
>> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
>> ---
>> mm/vma.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>
> Makes sense.
>
> Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
--
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: "Zi Yan" <ziy@nvidia.com>
To: "Lorenzo Stoakes (ARM)" <ljs@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>,
"Mike Rapoport" <rppt@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>,
"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>
Cc: <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 v3 16/40] mm/vma: only allow mmap to clear VMA_MAYWRITE_BIT if kernel-owned
Date: Fri, 25 Sep 2026 22:17:10 -0400 [thread overview]
Message-ID: <DLOVXY4VFCXE.1RI7ZSD30VHH5@nvidia.com> (raw)
In-Reply-To: <DLOVQMACWLZ5.1WFOTGRG8ZG92@nvidia.com>
On Fri Sep 25, 2026 at 10:07 PM EDT, Zi Yan wrote:
> On Thu Sep 17, 2026 at 12:22 PM EDT, Lorenzo Stoakes (ARM) wrote:
>> For ordinary files the only way the VMA_MAYWRITE_BIT flag is cleared is if
>> the underlying file is itself read-only.
>>
>> This means that mprotect() cannot mark a shared mapping of a read-only file
>> as read/write, as doing so would violate the read only attribute, and
>> permit writes.
>>
>> In general, we do not want file systems to be able to do this for
>> read/write files.
>>
>> Doing so would violate fundamental user expectation of file attributes and
>> likely break userspace.
>>
>> However, drivers pose a tricky problem here - the /dev/xxx file may be
>> read/write but provide access to a resource which is fundamentally
>> read-only.
>>
>> Therefore we must allow drivers to be able to clear VMA_MAYWRITE_BIT.
IIUC, a file's FMODE_* bear both fd and mmap permissions, e.g.,
FMODE_WRITE means fd is writable and mmap is writable. At least for
normal files. But a driver fd might not fit the same pattern. Would a
new FMODE_MAP_READ and a new FMODE_MAP_WRITE help? Not trying to propose
anything, but just thinking out load.
>>
>> To achieve both of these things, restrict this ability to kernel-owned
>> mappings as identified by vma_flags_is_kernel_owned().
>>
>> This constrains this ability to drivers which own the mapping's contents,
>> whether memory-mapped I/O, kernel-allocated pages, or ordinary pages they
>> map themselves, and so define its semantics.
>>
>> Every in-tree mmap hook which clears VMA_MAYWRITE_BIT, some twenty sites
>> across drivers, filesystems and bpf, establishes a kernel-owned mapping,
>> with usbmon and the ALSA PCM status page converted earlier in this series
>> to do so.
>>
>> Note that drivers may, if they do not gate on VMA_SHARED_BIT, be able to
>> disable MAP_PRIVATE-file-backed mapping CoW semantics.
>>
>> This is perhaps not always intended, but we retain this capacity to
>> maintain existing behaviour.
>>
>> As all drivers which clear VMA_MAYWRITE_BIT establish kernel-owned
>> mappings, no functional change is intended.
>>
>> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
>> ---
>> mm/vma.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>
> Makes sense.
>
> Acked-by: Zi Yan <ziy@nvidia.com>
--
Best Regards,
Yan, Zi
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-09-26 2:17 UTC|newest]
Thread overview: 483+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 16:22 [PATCH v3 00/40] mm: make VMA flag semantics explicit, eliminate VM_SPECIAL Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 01/40] mm/vma: fix mmap_prepare file handling, remove file_doesnt_need_get Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:54 ` sashiko-bot
2026-09-23 15:21 ` Suren Baghdasaryan
2026-09-23 15:21 ` Suren Baghdasaryan
2026-09-23 15:21 ` Suren Baghdasaryan
2026-09-23 15:46 ` Lorenzo Stoakes (ARM)
2026-09-23 15:46 ` Lorenzo Stoakes (ARM)
2026-09-23 15:46 ` Lorenzo Stoakes (ARM)
2026-09-23 15:59 ` Suren Baghdasaryan
2026-09-23 15:59 ` Suren Baghdasaryan
2026-09-23 15:59 ` Suren Baghdasaryan
2026-09-24 2:20 ` Zi Yan
2026-09-24 2:20 ` Zi Yan
2026-09-24 2:20 ` Zi Yan
2026-09-24 10:03 ` Lorenzo Stoakes (ARM)
2026-09-24 10:03 ` Lorenzo Stoakes (ARM)
2026-09-24 10:03 ` Lorenzo Stoakes (ARM)
2026-09-24 16:28 ` Gregory Price
2026-09-25 9:30 ` Lorenzo Stoakes (ARM)
2026-09-24 19:00 ` Liam R. Howlett
2026-09-24 19:00 ` Liam R. Howlett
2026-09-24 19:00 ` Liam R. Howlett
2026-09-25 9:12 ` Lorenzo Stoakes (ARM)
2026-09-25 9:12 ` Lorenzo Stoakes (ARM)
2026-09-25 9:12 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 02/40] mm/vma: predicate setting mmap_prepare VMA fields on new vma alloc Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:07 ` sashiko-bot
2026-09-23 15:32 ` Suren Baghdasaryan
2026-09-23 15:32 ` Suren Baghdasaryan
2026-09-23 15:32 ` Suren Baghdasaryan
2026-09-23 15:53 ` Lorenzo Stoakes (ARM)
2026-09-23 15:53 ` Lorenzo Stoakes (ARM)
2026-09-23 15:53 ` Lorenzo Stoakes (ARM)
2026-09-23 16:09 ` Suren Baghdasaryan
2026-09-23 16:09 ` Suren Baghdasaryan
2026-09-23 16:09 ` Suren Baghdasaryan
2026-09-23 17:07 ` Lorenzo Stoakes (ARM)
2026-09-23 17:07 ` Lorenzo Stoakes (ARM)
2026-09-23 17:07 ` Lorenzo Stoakes (ARM)
2026-09-23 17:33 ` Lorenzo Stoakes (ARM)
2026-09-23 17:33 ` Lorenzo Stoakes (ARM)
2026-09-23 17:33 ` Lorenzo Stoakes (ARM)
2026-09-24 2:25 ` Zi Yan
2026-09-24 2:25 ` Zi Yan
2026-09-24 2:25 ` Zi Yan
2026-09-17 16:22 ` [PATCH v3 03/40] mm/vma: introduce and use vma_[flags_]can_merge() Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:11 ` sashiko-bot
2026-09-23 16:23 ` Suren Baghdasaryan
2026-09-23 16:23 ` Suren Baghdasaryan
2026-09-23 16:23 ` Suren Baghdasaryan
2026-09-24 2:27 ` Zi Yan
2026-09-24 2:27 ` Zi Yan
2026-09-24 2:27 ` Zi Yan
2026-09-24 16:38 ` Gregory Price
2026-09-24 16:38 ` Gregory Price
2026-09-24 16:38 ` Gregory Price
2026-10-01 12:03 ` David Hildenbrand (Arm)
2026-10-01 12:03 ` David Hildenbrand (Arm)
2026-10-01 12:03 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 04/40] mm: consistently validate VMA state after mmap[_prepare] hooks Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:38 ` sashiko-bot
2026-09-23 16:47 ` Suren Baghdasaryan
2026-09-23 16:47 ` Suren Baghdasaryan
2026-09-23 16:47 ` Suren Baghdasaryan
2026-09-23 17:00 ` Lorenzo Stoakes (ARM)
2026-09-23 17:00 ` Lorenzo Stoakes (ARM)
2026-09-23 17:00 ` Lorenzo Stoakes (ARM)
2026-09-24 2:52 ` Zi Yan
2026-09-24 2:52 ` Zi Yan
2026-09-24 2:52 ` Zi Yan
2026-09-24 10:06 ` Lorenzo Stoakes (ARM)
2026-09-24 10:06 ` Lorenzo Stoakes (ARM)
2026-09-24 10:06 ` Lorenzo Stoakes (ARM)
2026-09-24 17:17 ` Gregory Price
2026-09-24 17:17 ` Gregory Price
2026-09-24 17:17 ` Gregory Price
2026-09-25 12:51 ` Lorenzo Stoakes (ARM)
2026-09-25 12:51 ` Lorenzo Stoakes (ARM)
2026-09-25 12:51 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 05/40] mm/vma: ensure mmap_prepare doesn't set actions on a mergeable vma Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:32 ` sashiko-bot
2026-09-24 18:00 ` Gregory Price
2026-09-24 18:00 ` Gregory Price
2026-09-24 18:00 ` Gregory Price
2026-09-25 9:51 ` Lorenzo Stoakes (ARM)
2026-09-25 9:51 ` Lorenzo Stoakes (ARM)
2026-09-25 9:51 ` Lorenzo Stoakes (ARM)
2026-09-24 19:28 ` Zi Yan
2026-09-24 19:28 ` Zi Yan
2026-09-24 19:28 ` Zi Yan
2026-09-25 9:55 ` Lorenzo Stoakes (ARM)
2026-09-25 9:55 ` Lorenzo Stoakes (ARM)
2026-09-25 9:55 ` Lorenzo Stoakes (ARM)
2026-09-25 7:28 ` Suren Baghdasaryan
2026-09-25 7:28 ` Suren Baghdasaryan
2026-09-25 7:28 ` Suren Baghdasaryan
2026-09-25 9:53 ` Lorenzo Stoakes (ARM)
2026-09-25 9:53 ` Lorenzo Stoakes (ARM)
2026-09-25 9:53 ` Lorenzo Stoakes (ARM)
2026-10-01 12:11 ` David Hildenbrand (Arm)
2026-10-01 12:11 ` David Hildenbrand (Arm)
2026-10-01 12:11 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 06/40] mm: make map_kernel_pages_[prepare,complete] internal and unexported Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:17 ` sashiko-bot
2026-09-24 19:30 ` Zi Yan
2026-09-24 19:30 ` Zi Yan
2026-09-24 19:30 ` Zi Yan
2026-09-25 7:35 ` Suren Baghdasaryan
2026-09-25 7:35 ` Suren Baghdasaryan
2026-09-25 7:35 ` Suren Baghdasaryan
2026-09-29 15:58 ` Gregory Price
2026-09-29 15:58 ` Gregory Price
2026-09-29 15:58 ` Gregory Price
2026-10-01 12:11 ` David Hildenbrand (Arm)
2026-10-01 12:11 ` David Hildenbrand (Arm)
2026-10-01 12:11 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 07/40] mm/vma: tidy up map kernel pages enum values Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:17 ` sashiko-bot
2026-09-24 19:30 ` Zi Yan
2026-09-24 19:30 ` Zi Yan
2026-09-24 19:30 ` Zi Yan
2026-09-25 7:37 ` Suren Baghdasaryan
2026-09-25 7:37 ` Suren Baghdasaryan
2026-09-25 7:37 ` Suren Baghdasaryan
2026-09-29 15:59 ` Gregory Price
2026-09-29 15:59 ` Gregory Price
2026-09-29 15:59 ` Gregory Price
2026-10-01 12:12 ` David Hildenbrand (Arm)
2026-10-01 12:12 ` David Hildenbrand (Arm)
2026-10-01 12:12 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 08/40] mm: add mmap action for discontiguous kernel page mapping Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:25 ` sashiko-bot
2026-09-25 20:53 ` Zi Yan
2026-09-25 20:53 ` Zi Yan
2026-09-25 20:53 ` Zi Yan
2026-09-27 21:44 ` Suren Baghdasaryan
2026-09-27 21:44 ` Suren Baghdasaryan
2026-09-27 21:44 ` Suren Baghdasaryan
2026-09-29 11:11 ` Lorenzo Stoakes (ARM)
2026-09-29 11:11 ` Lorenzo Stoakes (ARM)
2026-09-29 11:11 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 09/40] docs: filesystems: update mmap_prepare docs for discontig kernel pgs Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:32 ` sashiko-bot
2026-09-25 21:01 ` Zi Yan
2026-09-25 21:01 ` Zi Yan
2026-09-25 21:01 ` Zi Yan
2026-09-29 11:21 ` Lorenzo Stoakes (ARM)
2026-09-29 11:21 ` Lorenzo Stoakes (ARM)
2026-09-29 11:21 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 10/40] drivers/usb/mon: update to use mmap_prepare + map kernel pages Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:29 ` sashiko-bot
2026-10-02 9:55 ` Lance Yang
2026-10-02 12:12 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 11/40] infiniband: update hfi1 to use remap_vmalloc_range() Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:36 ` sashiko-bot
2026-09-17 16:22 ` [PATCH v3 12/40] selinux: reject writable opens of policy file, drop mmap shared/write check Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:25 ` sashiko-bot
2026-09-17 16:22 ` [PATCH v3 13/40] ALSA: pcm: use vm_insert_page() to map PCM status page Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:34 ` sashiko-bot
2026-09-17 16:22 ` [PATCH v3 14/40] bpf: arena: mark arena_map_mmap() mappings VM_MIXEDMAP Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:25 ` sashiko-bot
2026-09-17 16:22 ` [PATCH v3 15/40] mm/vma: add vma[_flags]_is_kernel_owned() predicates Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:21 ` sashiko-bot
2026-09-26 1:37 ` Zi Yan
2026-09-26 1:37 ` Zi Yan
2026-09-26 1:37 ` Zi Yan
2026-10-01 12:36 ` David Hildenbrand (Arm)
2026-10-01 12:36 ` David Hildenbrand (Arm)
2026-10-01 12:36 ` David Hildenbrand (Arm)
2026-10-02 14:56 ` Lorenzo Stoakes (ARM)
2026-10-02 14:56 ` Lorenzo Stoakes (ARM)
2026-10-02 14:56 ` Lorenzo Stoakes (ARM)
2026-10-02 21:19 ` David Hildenbrand (Arm)
2026-10-02 21:19 ` David Hildenbrand (Arm)
2026-10-02 21:19 ` David Hildenbrand (Arm)
2026-10-03 9:03 ` Lorenzo Stoakes (ARM)
2026-10-03 9:03 ` Lorenzo Stoakes (ARM)
2026-10-03 9:03 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 16/40] mm/vma: only allow mmap to clear VMA_MAYWRITE_BIT if kernel-owned Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:28 ` sashiko-bot
2026-09-26 2:07 ` Zi Yan
2026-09-26 2:07 ` Zi Yan
2026-09-26 2:07 ` Zi Yan
2026-09-26 2:17 ` Zi Yan [this message]
2026-09-26 2:17 ` Zi Yan
2026-09-26 2:17 ` Zi Yan
2026-09-26 10:06 ` Lorenzo Stoakes (ARM)
2026-09-26 10:06 ` Lorenzo Stoakes (ARM)
2026-09-26 10:06 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 17/40] mm/vma: add and use vma_[flags]_is_fixed_mapping Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:27 ` sashiko-bot
2026-09-26 2:27 ` Zi Yan
2026-09-26 2:27 ` Zi Yan
2026-09-26 2:27 ` Zi Yan
2026-09-26 10:03 ` Lorenzo Stoakes (ARM)
2026-09-26 10:03 ` Lorenzo Stoakes (ARM)
2026-09-26 10:03 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 18/40] scsi: sg: convert mmap hook to mmap_prepare and rework Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:34 ` sashiko-bot
2026-09-17 16:22 ` [PATCH v3 19/40] fbdev: defio: assert FBINFO_VIRTFB, drop VM_IO, add VM_MIXEDMAP Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:27 ` sashiko-bot
2026-09-17 16:22 ` [PATCH v3 20/40] HSI: cmt_speech: convert mmap hook to mmap_prepare, refactor Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:31 ` sashiko-bot
2026-09-17 16:22 ` [PATCH v3 21/40] mm/gup: error out early on !VMA_MAYREAD_BIT VMAs Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:30 ` sashiko-bot
2026-09-26 2:30 ` Zi Yan
2026-09-26 2:30 ` Zi Yan
2026-09-26 2:30 ` Zi Yan
2026-09-17 16:22 ` [PATCH v3 22/40] uprobes: remove VM_IO, set VM_MIXEDMAP for mapped kernel pages Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:30 ` sashiko-bot
2026-09-17 16:22 ` [PATCH v3 23/40] mm/mlock: clear VMA_LOCKED_MASK over mmap callback Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:32 ` sashiko-bot
2026-10-01 15:20 ` Zi Yan
2026-10-01 15:20 ` Zi Yan
2026-10-01 15:20 ` Zi Yan
2026-10-02 12:26 ` Lorenzo Stoakes (ARM)
2026-10-02 12:26 ` Lorenzo Stoakes (ARM)
2026-10-02 12:26 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 24/40] mm/mlock: eliminate weird VMA_IO_BIT abuse and simplify Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:43 ` sashiko-bot
2026-09-23 20:06 ` Zi Yan
2026-09-23 20:06 ` Zi Yan
2026-09-23 20:06 ` Zi Yan
2026-09-24 10:21 ` Lorenzo Stoakes (ARM)
2026-09-24 10:21 ` Lorenzo Stoakes (ARM)
2026-09-24 10:21 ` Lorenzo Stoakes (ARM)
2026-09-24 15:50 ` Zi Yan
2026-09-24 15:50 ` Zi Yan
2026-09-24 15:50 ` Zi Yan
2026-09-25 9:35 ` Lorenzo Stoakes (ARM)
2026-09-25 9:35 ` Lorenzo Stoakes (ARM)
2026-09-25 9:35 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 25/40] mm/vma: enforce that only kernel-owned mappings may set VMA_IO_BIT Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:31 ` sashiko-bot
2026-09-29 2:12 ` Zi Yan
2026-09-29 2:12 ` Zi Yan
2026-09-29 2:12 ` Zi Yan
2026-09-17 16:22 ` [PATCH v3 26/40] mm: remove VMA_IO_BIT check in vma[_flags]_is_kernel_owned() Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:34 ` sashiko-bot
2026-09-17 16:22 ` [PATCH v3 27/40] mm: remove hugetlb_inline.h Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:31 ` sashiko-bot
2026-09-29 2:13 ` Zi Yan
2026-09-29 2:13 ` Zi Yan
2026-09-29 2:13 ` Zi Yan
2026-10-02 6:52 ` David Hildenbrand (Arm)
2026-10-02 6:52 ` David Hildenbrand (Arm)
2026-10-02 6:52 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 28/40] mm: rename is_vm_hugetlb_page() to vma_is_hugetlb() Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:30 ` sashiko-bot
2026-09-29 2:14 ` Zi Yan
2026-09-29 2:14 ` Zi Yan
2026-09-29 2:14 ` Zi Yan
2026-10-02 6:53 ` David Hildenbrand (Arm)
2026-10-02 6:53 ` David Hildenbrand (Arm)
2026-10-02 6:53 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 29/40] mm: drop some redundant checks around hugetlb VMAs Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:32 ` sashiko-bot
2026-09-29 2:36 ` Zi Yan
2026-09-29 2:36 ` Zi Yan
2026-09-29 2:36 ` Zi Yan
2026-10-02 6:54 ` David Hildenbrand (Arm)
2026-10-02 6:54 ` David Hildenbrand (Arm)
2026-10-02 6:54 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 30/40] mm/madvise: update is_valid_guard_vma() to use vma_can_merge() Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:37 ` sashiko-bot
2026-09-29 2:38 ` Zi Yan
2026-09-29 2:38 ` Zi Yan
2026-09-29 2:38 ` Zi Yan
2026-10-02 6:57 ` David Hildenbrand (Arm)
2026-10-02 6:57 ` David Hildenbrand (Arm)
2026-10-02 6:57 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 31/40] mm/vma: introduce vma[_flags]_is_persistent() Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:35 ` sashiko-bot
2026-09-30 2:00 ` Zi Yan
2026-09-30 2:00 ` Zi Yan
2026-09-30 2:00 ` Zi Yan
2026-10-02 6:59 ` David Hildenbrand (Arm)
2026-10-02 6:59 ` David Hildenbrand (Arm)
2026-10-02 6:59 ` David Hildenbrand (Arm)
2026-10-02 7:02 ` David Hildenbrand (Arm)
2026-10-02 7:02 ` David Hildenbrand (Arm)
2026-10-02 7:02 ` David Hildenbrand (Arm)
2026-10-02 7:05 ` David Hildenbrand (Arm)
2026-10-02 7:05 ` David Hildenbrand (Arm)
2026-10-02 7:05 ` David Hildenbrand (Arm)
2026-10-02 12:08 ` Lorenzo Stoakes (ARM)
2026-10-02 12:08 ` Lorenzo Stoakes (ARM)
2026-10-02 12:08 ` Lorenzo Stoakes (ARM)
2026-10-02 12:35 ` David Hildenbrand (Arm)
2026-10-02 12:35 ` David Hildenbrand (Arm)
2026-10-02 12:35 ` David Hildenbrand (Arm)
2026-10-02 12:48 ` Lorenzo Stoakes (ARM)
2026-10-02 12:48 ` Lorenzo Stoakes (ARM)
2026-10-02 12:48 ` Lorenzo Stoakes (ARM)
2026-10-02 13:11 ` David Hildenbrand (Arm)
2026-10-02 13:11 ` David Hildenbrand (Arm)
2026-10-02 13:11 ` David Hildenbrand (Arm)
2026-10-02 13:59 ` Lorenzo Stoakes (ARM)
2026-10-02 13:59 ` Lorenzo Stoakes (ARM)
2026-10-02 13:59 ` Lorenzo Stoakes (ARM)
2026-10-02 21:43 ` David Hildenbrand (Arm)
2026-10-02 21:43 ` David Hildenbrand (Arm)
2026-10-02 21:43 ` David Hildenbrand (Arm)
2026-10-03 13:16 ` Lorenzo Stoakes (ARM)
2026-10-03 13:16 ` Lorenzo Stoakes (ARM)
2026-10-03 13:16 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 32/40] mm/uffd: use predicates for userfaultfd checks Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:38 ` sashiko-bot
2026-09-30 2:02 ` Zi Yan
2026-09-30 2:02 ` Zi Yan
2026-09-30 2:02 ` Zi Yan
2026-10-02 7:04 ` David Hildenbrand (Arm)
2026-10-02 7:04 ` David Hildenbrand (Arm)
2026-10-02 7:04 ` David Hildenbrand (Arm)
2026-10-02 12:35 ` Lorenzo Stoakes (ARM)
2026-10-02 12:35 ` Lorenzo Stoakes (ARM)
2026-10-02 12:35 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 33/40] mm/madvise: use predicates for madvise(..., MADV_DOFORK) Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:37 ` sashiko-bot
2026-09-30 2:28 ` Zi Yan
2026-09-30 2:28 ` Zi Yan
2026-09-30 2:28 ` Zi Yan
2026-09-17 16:22 ` [PATCH v3 34/40] mm: eliminate VMA_SPECIAL_FLAGS usage when hugetlb explicitly tested Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:45 ` sashiko-bot
2026-09-30 2:42 ` Zi Yan
2026-09-30 2:42 ` Zi Yan
2026-09-30 2:42 ` Zi Yan
2026-09-30 9:32 ` Lorenzo Stoakes (ARM)
2026-09-30 9:32 ` Lorenzo Stoakes (ARM)
2026-09-30 9:32 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` [PATCH v3 35/40] mm: eliminate VMA_SPECIAL_FLAGS check in lru_gen_look_around() Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:41 ` sashiko-bot
2026-09-30 2:42 ` Zi Yan
2026-09-30 2:42 ` Zi Yan
2026-09-30 2:42 ` Zi Yan
2026-10-02 7:06 ` David Hildenbrand (Arm)
2026-10-02 7:06 ` David Hildenbrand (Arm)
2026-10-02 7:06 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 36/40] mm: avoid use of VMA_SPECIAL_FLAGS in migrate_vma_setup() Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:40 ` sashiko-bot
2026-09-30 2:47 ` Zi Yan
2026-09-30 2:47 ` Zi Yan
2026-09-30 2:47 ` Zi Yan
2026-10-02 7:07 ` David Hildenbrand (Arm)
2026-10-02 7:07 ` David Hildenbrand (Arm)
2026-10-02 7:07 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 37/40] mm: eliminate VM_SPECIAL, VMA_SPECIAL_FLAGS Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:44 ` sashiko-bot
2026-09-30 2:48 ` Zi Yan
2026-09-30 2:48 ` Zi Yan
2026-09-30 2:48 ` Zi Yan
2026-10-02 7:07 ` David Hildenbrand (Arm)
2026-10-02 7:07 ` David Hildenbrand (Arm)
2026-10-02 7:07 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 38/40] fuse: dax: do not set VM_MIXEDMAP Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:38 ` sashiko-bot
2026-10-02 7:09 ` David Hildenbrand (Arm)
2026-10-02 7:09 ` David Hildenbrand (Arm)
2026-10-02 7:09 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 39/40] mm/huge_memory: remove vma_is_special_huge() Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:38 ` sashiko-bot
2026-10-01 15:21 ` Zi Yan
2026-10-01 15:21 ` Zi Yan
2026-10-01 15:21 ` Zi Yan
2026-10-02 7:11 ` David Hildenbrand (Arm)
2026-10-02 7:11 ` David Hildenbrand (Arm)
2026-10-02 7:11 ` David Hildenbrand (Arm)
2026-09-17 16:22 ` [PATCH v3 40/40] mm/vma: introduce and use vma[_flags]_can_gup() Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 16:22 ` Lorenzo Stoakes (ARM)
2026-09-17 17:36 ` sashiko-bot
2026-10-01 15:23 ` Zi Yan
2026-10-01 15:23 ` Zi Yan
2026-10-01 15:23 ` Zi Yan
2026-10-02 7:48 ` David Hildenbrand (Arm)
2026-10-02 7:48 ` David Hildenbrand (Arm)
2026-10-02 7:48 ` David Hildenbrand (Arm)
2026-10-02 16:11 ` Lorenzo Stoakes (ARM)
2026-10-02 16:11 ` Lorenzo Stoakes (ARM)
2026-10-02 16:11 ` Lorenzo Stoakes (ARM)
2026-09-17 21:23 ` [PATCH v3 00/40] mm: make VMA flag semantics explicit, eliminate VM_SPECIAL Andrew Morton
2026-09-17 21:23 ` Andrew Morton
2026-09-17 21:23 ` Andrew Morton
2026-09-23 8:57 ` Lorenzo Stoakes (ARM)
2026-09-23 8:57 ` Lorenzo Stoakes (ARM)
2026-09-23 8:57 ` Lorenzo Stoakes (ARM)
2026-09-25 15:58 ` Lorenzo Stoakes (ARM)
2026-09-25 22:06 ` Arnd Bergmann
2026-09-25 22:06 ` Arnd Bergmann
2026-09-25 22:06 ` Arnd Bergmann
2026-09-26 9:40 ` Lorenzo Stoakes (ARM)
2026-09-26 9:40 ` Lorenzo Stoakes (ARM)
2026-09-26 9:40 ` Lorenzo Stoakes (ARM)
2026-09-26 13:06 ` Arnd Bergmann
2026-09-26 13:06 ` Arnd Bergmann
2026-09-26 13:06 ` Arnd Bergmann
2026-09-26 13:22 ` Lorenzo Stoakes (ARM)
2026-09-26 13:22 ` Lorenzo Stoakes (ARM)
2026-09-26 13:22 ` Lorenzo Stoakes (ARM)
2026-09-26 17:14 ` Arnd Bergmann
2026-09-26 17:14 ` Arnd Bergmann
2026-09-26 17:14 ` Arnd Bergmann
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=DLOVXY4VFCXE.1RI7ZSD30VHH5@nvidia.com \
--to=ziy@nvidia.com \
--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 \
/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.