All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Cc: linux-rdma@vger.kernel.org, "Heiko Carstens" <hca@linux.ibm.com>,
	linux-trace-kernel@vger.kernel.org,
	"Oliver Upton" <oupton@kernel.org>,
	linux-perf-users@vger.kernel.org, kvmarm@lists.linux.dev,
	selinux@vger.kernel.org,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	kvm@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-s390@vger.kernel.org, "Vasily Gorbik" <gor@linux.ibm.com>,
	dri-devel@lists.freedesktop.org,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	bpf@vger.kernel.org, "Marc Zyngier" <maz@kernel.org>
Subject: Re: [PATCH v2 31/40] mm/vma: introduce vma[_flags]_is_persistent()
Date: Mon, 14 Sep 2026 22:12:42 +0000	[thread overview]
Message-ID: <20260914221243.2B6FB1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260914-b4-mmap-prepare-vma-flag-sanify-v2-31-7d9781ed5361@kernel.org>

> Introduce vma[_flags]_is_persistent() for the purposes of identifying
> mappings that are persistent in the sense that bytes to the mapping stay
> there, and bytes read from the mapping are the same unless changed by
> actions taken by userland.
> 
> Kernel-owned mappings do not fall into this category, as their owner may
> change the contents without the user having initiated it, and nor of course
> does memory-mapped I/O.
> 
> We exclude fixed mappings as these are singled out as being unmergeable and
> so cannot be guaranteed to persist user data.
> 
> hugetlb mappings are fixed mappings, but their contents are entirely the
> user's, so they are explicitly carved out as persistent, as the MADV_DODUMP
> check already does.
> 
> It excludes droppable mappings, which by their nature are ephemeral.
> 
> Use this functionality to update the madvise MADV_DODUMP check to test for
> persistence rather than open-coding this.
> 
> This replaces the VM_SPECIAL check which means it no longer checks for
> VMA_IO_BIT, however this is safe as we have established the invariant that
> only kernel-owned mappings may set VMA_IO_BIT, so we implicitly include
> these.
> 
> No functional change intended.
> 
> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260914-b4-mmap-prepare-vma-flag-sanify-v2-0-7d9781ed5361@kernel.org?part=31


  reply	other threads:[~2026-09-14 22:12 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
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 [this message]
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=20260914221243.2B6FB1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=bpf@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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.